Reputation: 2217
I created a Google Analytics account for my Chrome extension. I use a faked website url in the parameters because GA doesn't accept a protocol like chrome-extension://...
As GA isn't linked to a specific domain which I own, it doesn't block data from outside. Is there a solution for this ? Can GA use chrome-extension:// or my extension id ?
Thx
Upvotes: 0
Views: 91
Reputation: 19110
One of the solutions is to create a real web page on your host, for example http://example.com/analytics.html. And insert in this page the google analytics script.
Then inject this page as an iframe using content scripts into the websites you need. This will trigger google analytics without problems.
Upvotes: 1