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

misc(treemap): add GA snippet for new property #12481

Merged
merged 1 commit into from
May 14, 2021
Merged

Conversation

connorjclark
Copy link
Collaborator

@connorjclark connorjclark commented May 14, 2021

Just tracking page views for now.

ref #11254

@connorjclark connorjclark requested a review from a team as a code owner May 14, 2021 21:36
@connorjclark connorjclark requested review from patrickhulce and removed request for a team May 14, 2021 21:36
@google-cla google-cla bot added the cla: yes label May 14, 2021
@@ -87,17 +87,14 @@

<script src="src/bundled.js"></script>

<!-- Google Analytics -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-16X003MB7V"></script>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😢


ga('create', 'UA-85519014-2', 'auto');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just change the property descriptor? analytics still documents this approach and I'd hate to not follow our own aspirational advice

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, and the different prefix in the identifier makes me think twice about doing that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so GA 4 isn't as bad as I thought

good news: stopped doing the double script hop, so gtag is the only script loaded to fire GA events
bad news: the script is 140% larger and increases TBT 385% more (granted GA only contributes ~5ms with the original so quintupling only gives you ~25ms, but hey I'm still a little salty 😉 )


ga('create', 'UA-85519014-2', 'auto');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@connorjclark connorjclark merged commit 4d4f31e into master May 14, 2021
@connorjclark connorjclark deleted the treemap-ga branch May 14, 2021 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants