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

Update tracking of outbound links to include all link types #3386

Open
2 tasks
MillenniumFalconMechanic opened this issue Nov 19, 2024 · 2 comments
Open
2 tasks
Assignees

Comments

@MillenniumFalconMechanic
Copy link
Collaborator

MillenniumFalconMechanic commented Nov 19, 2024

Need

Currently, only "true" outbound links are being tracked by GTM and not mocked links such as the links to the Catalog and Explorer. All outbound links, true and mocked, must be tracked.

Approach

  • Update tag - outbound_link_click and trigger - outbound_link_click to be ..._clicked. Completed.
  • Determine root cause of missing outbound links and document on this document.
    • Can we update the trigger - outbound_link_click trigger to fire on "All Elements" and if not, why not?
@MillenniumFalconMechanic MillenniumFalconMechanic changed the title Update tracking of outbound links to include "all link" types Update tracking of outbound links to include all link types Nov 19, 2024
@jpaten
Copy link
Collaborator

jpaten commented Nov 20, 2024

@MillenniumFalconMechanic Will do on the first point - I'm going to make a checklist in the next comment so we can track it more easily, since this will require deploying a new version across multiple configs

On the second point, I don't think we can simply update trigger - outbound_link_click to fire on "All Elements", because this trigger does not seem to reliably track each click. To test, I added a tag/trigger that fires on all "Click - Just Links" event and a tag/trigger that fires on all "Click - All Elements". In some cases, such as clicking the "Beta Announcement" link, only "Click - Just Links" records a click url: (also, having both tags fire on each link seems to cause the current url to be recorded improperly, I'm not sure why since I didn't observe that before this test)

Image
Image
Image

Clicking the image links in the footer also causes unexpected behavior:

Image
Image
Image

Most frustrating-ly, there are also mocked links that aren't tracked using "Click - Just Links", but that also don't get a url recorded for "All Elements"

Image
Image

And in contrast, there are mocked links that work for both
Image
Image
Image

So I'm not entirely sure what to make of this. ChatGPT said the best strategy would be to create a custom event that fires on all clicks, but I think implementing that for the various different sorts of mock links would be complex, and a very quick google search didn't find anything promising. Let me know if you have any tips, sorry that this is such a wall of text!

@jpaten
Copy link
Collaborator

jpaten commented Nov 20, 2024

Rename Tracker:

  • anvilproject.org (portal)
    • Prod
    • Staging
  • anvilproject.org/data (catalog)
    • Prod
    • Staging
  • explore.anvilproject.org (explorer)
    • Prod
    • Staging
  • ncpi-data.org
    • Prod
    • Staging
  • data.humancellatlas.org
    • Prod
    • Staging
  • data-browser.lungmap.net
    • Prod
    • Staging

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

2 participants