Google Analytics


#1

Hi,

For quite some time we were investigating possible ways to understand our viewers needs better. We really would like to learn more about them, i.e. the number of unique viewers, their age, citizenship etc. I know that twitch exposes analytics, which is a good first step but it’s not sufficient for us.

The obvious soluition would be to add google analytics. I’ve searched the forum to check if anyone was able to add GA to his extension, but unfortunately, i didn’t get a clear answer. Let’s make it clear once and for all: is it allowed to add GA integration into the overlay extension?

In case if GA is illegal, are there any solutions that are legal from the Twitch policy perspective?

Regards,
Slawek


#2

Adding GA is essentially not possible. As it would need to set a Cookie and you can’t/shouldn’t set cookies. (Cookies are blocked iirc but I think localstorage is allowed not sure/can’t confirm off hand)

Further more it would be a nightmare from the security and privacy policy perspective. Due to the fact Twitch would technically need to make changes to it’s privacy policy in order to allow third party GA in an extension and fun with opt’ing etc. (Especially in a GDPR world)

What does exist is the Extensions Analytics you can find here:


#3

Oh really adding any third party analytics package is not allowed? Mixpanel etc included?


#4

Anything that requires a cookie to function.

But please read the Guidelines and rules.

But afaik Twitch’s Privacy Policy as per GDPR doesn’t include a message saying “we pass data to a third party via a third party”.

Further more:

Given that the Twitch Extensions code is hosted of Twitch’s servers too, and most, if not all Analytics programs contain obstifcated code, thats also not allowed in a twitch extension and you can’t include offsite libraries due to the CSP in place. (Which includes code.jquery.com too for example) So you can’t include include the script tags as the load attempt will be blocked.

So, before you even consider that you want to inject analytics into someone else’s website, without permission from the user (yay ethics). You just can’t do it anyway due to the security restrictions in place. (yay rules).

OH and not forgetting if your extension supports mobile, theres a pile of rules about over the wire limits, AND recent builds of safari (desktop) have done something weird with permissions in iframes across domains (some Shopify applications are TOTALLY hosed right now).

TLDR: You can’t do it Legally speaking (GDPR) and you can’t do it as it’s against the Extension rules.

I suppose Tracking Pixels might function, but that might violate GDPR.


#5

I’ll read the Guidelines for sure. FYI Mixpanel has a nodejs plugin without any code obfuscation so it works fine technically. I also checked the Twitch Analytics and Insights - I’m sure its all new but its a long long long way away from being a professional product right now - it’s extremely difficult to construct funnels and do analysis on user behaviour in order to remove kinks in the user experience. Developing a product blindly in this day and age is extremely frustrating!


#6

One of my top feedback to the Analytics team is “funnels please!”

Right now you can run your own funnels and transmit data back to your EBS and monitor that way, you just can’t punt it offsite to a third party analytics


#7

OMG. how do you actually build product these days w/o knowing what is happening through GA/mixpanel/etc? That’s so dissapointing.

It would be valuable to read something official from Twitch team. Two questions mainly.

Is it possible to implement js-based analytics (GA/mixpanel) in extensions? If so any tips on proper implementation would be highly appreciated


#8

In an age of GDPR, and (ad)blockers blocking tracking cookies, with difficulty…

And with regards to Twitch Extensions:

No.


#9

thank you, Barry! we shall consider waiting for twitch official answer since it’s not clear yet how to build product on feelings and not actual data


#10

What do you want thats not in the current insights and analytics offerings?


#11

being able to build custom funnels per viewer/streamer segment with support of custom events done in GUI


#12

Both of those I’ve suggested/asked for actually :smiley:


#13

Hi everyone,

Twitch has since then released a guide “Using Google Analytics in Extensions”, that even addresses potential GDPR concerns.

Sorry to dig out this very old thread again, but this is still the top result when searching for “Twitch Extension Google Analytics”, so I thought it would be useful for future reference.

Have a great day everyone!

Best,

Moritz