Mobile app version of vmapp.org
Login or Join
Nimeshi995

: Google Analytics inside iframe, multiple embeds on same page? I have built a widget that other users can embed in their sites as an iframe. I have included Google Analytics inside the widget,

@Nimeshi995

Posted in: #GoogleAnalytics #Iframe #Widgets

I have built a widget that other users can embed in their sites as an iframe. I have included Google Analytics inside the widget, so that I can tell when other users are embedding it.

My setup is that each widget has an ID, and I record the ID as a page view.

This works fine - when there is just one iframe in a page.

However, I've noticed that if a user puts multiple copies of my widget (with different IDs) in their page, only the last widget in the page records a page view. The other widgets are not recorded at all.


Why is this? I suspect that it may be something to do with Analytics only setting one cookie for my domain?
Is there anything I can do about it? I'd like to know each time each widget is embedded, whether on the same page or not.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Nimeshi995

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme