: Tracking content from 3rd party widget using Google Analytics I have a situation where I generate content (a widget which is composed of simple divs specifically) and serve them to 3rd party
I have a situation where I generate content (a widget which is composed of simple divs specifically) and serve them to 3rd party sites both synchronously & asynchronously.
While serving those widgets, I want to track the number of presentations and clicks from users using the widgets with Google Analytics.
Is that possible? What is the best approach to face this tracking issue?
More posts by @Si4351233
2 Comments
Sorted by latest first Latest Oldest Best
This is what I'd do, although keep in mind that you probably have to inform the sites where your widget is being displayed about this approach (since it would help avoid confusion for that person running analytics on that site).
In your widget, include your GA tracking code, send a "widget load" event. When the widget is clicked, send the "widget click" event.
An example of such a similar implementation would be olark (live chat widget). Interestingly (and this is something you might want to consider in order to deliver more value to your sites) olark provides GA integration options as well. So not only will the widget send data to your GA, but also it can be implemented to send this data to the site's GA.
You could embed a tracking pixel (or web bug) inside your divs. The pixel is not visible, but gets requested by visitors allowing you to track their visits. You can implement this on your own server, otherwise you can use one of the many tracking pixel services providing Google Analytics integration.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.