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

Google Analytics in extensions: example not up to date with GA changes #277

Closed
BarryCarlyon opened this issue Dec 23, 2020 · 1 comment
Closed
Labels
product: docs Documentation on dev.twitch.tv/docs

Comments

@BarryCarlyon
Copy link
Contributor

BarryCarlyon commented Dec 23, 2020

Brief description

https://dev.twitch.tv/docs/extensions/using-google-analytics-in-extensions

"Next Steps" Is out of date (and badly formatted)

Expected documentation

Something more similar to

(​function​(i,s,o,g,r,a,m){i[​'GoogleAnalyticsObject'​]=r;i[r]=i[r]||​function​(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=​1​*​new​ ​Date​();a=s.createElement(o), m=s.getElementsByTagName(o)[​0​];a.async=​1​;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,​'script'​,​'https://www.google-analytics.com/analytics.js'​,​'ga'​);
ga(​'create'​, ​'UA-123456-1'​, {
    cookieFlags: 'max-age=7200;secure;samesite=none'
}​);
ga(​'set'​, ​'anonymizeIp'​, ​true​);
ga('send', 'pageview', 'home');

To account for the need for cookieflags.
And this example will also use a "pageview" for the "home" of an extension

Other notes

https://www.simoahava.com/analytics/cookieflags-field-google-analytics/

@BarryCarlyon BarryCarlyon added the product: docs Documentation on dev.twitch.tv/docs label Dec 23, 2020
@jbulava
Copy link
Member

jbulava commented Jan 8, 2021

Updated in today's documentation deployment.

@jbulava jbulava closed this as completed Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: docs Documentation on dev.twitch.tv/docs
Projects
None yet
Development

No branches or pull requests

2 participants