Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Google analytics to the Portal #500

Open
prayagd opened this issue Jun 19, 2024 · 17 comments
Open

Add Google analytics to the Portal #500

prayagd opened this issue Jun 19, 2024 · 17 comments

Comments

@prayagd
Copy link
Collaborator

prayagd commented Jun 19, 2024

Context

In order to track the user actions on the Portal Google analytics script should be added to the portal for certain actions. This is the aim of the ticket.

Requirements

  • Add the following code to track the list of actions mentioned below
dataLayer.push({
'event': 'eventName',  //select_vault_manually
'label': 'vaultID',  // use actual vaultID 
});

  • List of actions to track
    • Category: Spacewalk
      • Action: Select vault manually (click the setting icon)
        • Label: Vault ID
      • Action: Transaction_initiation (clicking the "Bridge" button)
        • Label: Asset Type (XLM, USDC, etc.)
        • Label: Direction (To Pendulum, To Stellar)
        • Label: Transfer amount
      • Action: Click fee breakdown
      • Action: Transaction_status
        • Label: Completed, Cancelled
    • Category: Navigation
      • Action: Page view
        • Label: Page name (Dashboard, Staking, Spacewalk, Governance, Buy PEN)
      • Action: Select the network
        • Label: Pendulum, Amplitude, Foucoco
    • Category: Wallet
      • Action: Connect the wallet
        • Label: Wallet Type
      • Action: Disconnect the wallet
    • Category: Staking
      • Action: Stake
        • Label: Collator ID or name
        • Label: 50% or Max
      • Action: Unstake
        • Label: Collator ID or name
      • Action: Unlock
      • Action: Claim Rewards
        • Label: Update
        • Label: Claim
  • Above given code is just an example, label to added and removed as per the actions

Note

  • Category - Feature on portal
  • For actions, please add the code when its a portal UI action or when the onchain event is complete
@prayagd prayagd added the draft Work in progress label Jun 19, 2024
@prayagd prayagd removed the draft Work in progress label Jun 27, 2024
@prayagd
Copy link
Collaborator Author

prayagd commented Jun 27, 2024

@Sharqiewicz @ebma please let me know if anything unclear?

@ebma
Copy link
Member

ebma commented Jun 27, 2024

Don't we need to set something up in Google analytics as a prerequisite though? Or did you already do that @prayagd? Also, would we need to update our privacy policy for this feature?

@prayagd
Copy link
Collaborator Author

prayagd commented Jul 22, 2024

Don't we need to set something up in Google analytics as a prerequisite though?

dont think so

Also, would we need to update our privacy policy for this feature?

its already there

@prayagd
Copy link
Collaborator Author

prayagd commented Jul 22, 2024

Hey team! Please add your planning poker estimate with Zenhub @ebma @Sharqiewicz @TorstenStueber

@prayagd
Copy link
Collaborator Author

prayagd commented Aug 12, 2024

@ebma @Sharqiewicz after seeing the follow-up discussion for the vortex analytics ticket, what else is needed here? Let me know what more details you would need to work on this ticket

@TorstenStueber
Copy link
Member

There is a lot of extra setup required in Google Tag Manager. Who is going to manage this?

@prayagd
Copy link
Collaborator Author

prayagd commented Aug 12, 2024

Can you please explain what is extra setup? then i can take it over

@ebma
Copy link
Member

ebma commented Aug 12, 2024

@prayagd can we have the header and footer snippet similar to this ticket? As far as I understand it includes the project ID on google tag manager so it would look a little different in the portal.

@TorstenStueber
Copy link
Member

@prayagd Do you have experience with Google Tag Manager and Google Analytics?

You first need to manually define the possible events and arguments in GTM. Otherwise it is not possible for these events to arrive in Google Analytics.

@prayagd
Copy link
Collaborator Author

prayagd commented Aug 14, 2024

@prayagd Do you have experience with Google Tag Manager and Google Analytics?

No i dont

@prayagd
Copy link
Collaborator Author

prayagd commented Aug 14, 2024

@prayagd can we have the header and footer snippet similar to pendulum-chain/vortex#46 ticket?

Will get this

@Sharqiewicz
Copy link
Collaborator

@prayagd Have you configured Google Tag Manager? I estimate the task if the GTM configuration is already done

@ebma
Copy link
Member

ebma commented Aug 27, 2024

@TorstenStueber did you add the events and arguments last time for vortex? Or who added and configured those?

@TorstenStueber
Copy link
Member

@ebma I defined the events myself.

I added the respective code and then manually defined every kind of event with its arguments and datatypes in GTM. This is quite an overhead and we can probably avoid all of this by just adding GA directly instead of GTM.

@TorstenStueber
Copy link
Member

@pendulum-chain/product is this ticket blocked or can we move to Ready? Or is it not relevant anymore?

@prayagd
Copy link
Collaborator Author

prayagd commented Nov 6, 2024

IMO not a very high priority but good to have

@TorstenStueber
Copy link
Member

Can we reduce the scope? Do you really have a need to track all these activities, can we not start simple and then add more if we consider it necessary? Let's cut anything out that is just "nice to have".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants