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

Decide what to do with data-link-type="download" in GA4 #14062

Closed
Tracked by #14749
stephaniehobson opened this issue Jan 9, 2024 · 2 comments
Closed
Tracked by #14749

Decide what to do with data-link-type="download" in GA4 #14062

stephaniehobson opened this issue Jan 9, 2024 · 2 comments
Assignees

Comments

@stephaniehobson
Copy link
Contributor

stephaniehobson commented Jan 9, 2024

Description

In UA we record events when people click elements with the attribute data-link-type="download". In GA4 we record downloads with visits to /thanks. Do we want to continue to record clicks on these elements as some other kind of event?

An example:

<a 
    class="mzp-c-button mzp-t-product download-link ga-product-download" 
    href="https://download.mozilla.org/?product=firefox-esr-latest-ssl&os=osx&lang={{ LANG }}" 
    data-link-type="download" 
    data-download-os="Desktop" 
    data-download-version="osx" 
    data-display-name="Firefox Extended Support Release">
@stephaniehobson
Copy link
Contributor Author

stephaniehobson commented Feb 22, 2024

Perhaps recording these as download_click (the custom event the blogs use for referring to /new). Or cta_click.

@stephaniehobson
Copy link
Contributor Author

stephaniehobson commented Jul 30, 2024

I think we do want to record these clicks, as people like to know how the buttons on their pages perform. My current thinking on this is to track them with cta_click events.

  • data-display-name ➡ data-cta-text (try to reflect what the user sees)
  • data-link-location ➡ data-cta-position
  • data-download-os="Desktop|Android|iOS" ➡ data-cta-type="firefox|firefox_mobile"
  • data-download-version is used by stub attribution, don't touch
  • data-link-type
  • data-download-language

Also, note that in the example in comment 0, the ga-product-download class means this link is already triggering a product_download event. It's fine to trigger both a cta and a download event on the same element.

Edit: I talked to Adria and she backed-up tracking them as cta_clicks

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

No branches or pull requests

1 participant