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

Migrate to Google Analytics 4 (GA4) #972

Closed
8 tasks done
chalin opened this issue May 23, 2023 · 7 comments
Closed
8 tasks done

Migrate to Google Analytics 4 (GA4) #972

chalin opened this issue May 23, 2023 · 7 comments

Comments

@chalin
Copy link
Contributor

chalin commented May 23, 2023

This issue is being opened in the context of the following request: https://cncfservicedesk.atlassian.net/browse/CNCFSD-1770

Existing website info

  • UA site tag: UA-40398182-19
    • Insert link to Google UA console here.
    • TBD if there are other UA site tags being used (e.g., a separate tag for blog entries)
  • Netlify hosted (does CNCF have access?)

This issue is part of a CNCF-wide effort to upgrade project websites to GA4 since Google has deprecated Universal Analytics (UA). For more details, see:

Tasks

There are quite a few ways that we migrate to GA4. The following is, in most cases, the simplest:

  • Create a GA4 site tag under the CNCF projects account.
    The new GA4 stream measurement ID is: G-D5DEHT7DJ1
  • Connect the UA ID from the GA4 site tag
  • Configure GA4 website ID (gtag.js) through Netlify snippet injection, "Google Analytics 4 - in production only", just before </head>:
    {% if CONTEXT == 'production' %}
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-D5DEHT7DJ1"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'G-D5DEHT7DJ1');
    </script>
    {% endif %}
  • Confirm that the GA4 site tag is receiving events
  • Drop UA ID #973
  • Link GA4 ID to search console

If it is still relevant for the UA site tag to receive events, then:

  • Link the UA and GA4 site tags (in either direction, which ever is most convenient)
  • Confirm that the UA site tag is still receiving events

Google GA4 property created in 2022

Aiz granted me access to the UA console -- thanks! That allowed me to see that it was already connected to a GA4 property (with a data stream ID of G-EN7HNEVL6X), which was created by Joseph Lee on Dec. 6, 2022 -- as you can see from the change history of GA4 ID's console.

It seems that Joseph made further changes to that property yesterday, according to the change log. How would you like to proceed? We now have two GA4 site tags: one in each of the Sysdig and CNCF orgs. We probably don’t want to keep both.

@aijamalnk commented that we would be using the CNCF GA4 ID.

Followup items and related items

/cc @caniszczyk @nate-double-u


@leogr
Copy link
Member

leogr commented May 23, 2023

/kind cleanup

@chalin
Copy link
Contributor Author

chalin commented May 23, 2023

@leogr @LucaGuerra - can either of you confirm whether there are any other UA IDs used by the website that would need to be migrated? (I don't think so, but prefer asking.)

@chalin
Copy link
Contributor Author

chalin commented May 24, 2023

@LucaGuerra et al.: also, you'll need to ensure that the old UA ID wasn't auto-linked to an (auto-)created GA4 ID by Google. If you grant me access to the UA ID console, I can do the necessary checks. Otherwise, you'll need to look under the property config of Admin section.

@LucaGuerra
Copy link
Contributor

I believe @aijamalnk can confirm here but I don't think there should be any more UA IDs.

@aijamalnk
Copy link
Contributor

Thank you @chalin! Granted you the necessary access.

@chalin
Copy link
Contributor Author

chalin commented Jun 2, 2023

Search console linked to CNCF GA4 property:

image

@chalin
Copy link
Contributor Author

chalin commented Jun 2, 2023

Closing given that all tasks have been done. For followup items, see:

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

5 participants