简体   繁体   中英

Can Google Analytics track conversions inside a JS widget on a 3rd party site?

I'm working on a project that includes a javascript widget that can be wrapped around a video to enable subtitles. I'd like to track clicks when a person has the tool embedded on their site, in order to optimize UX.

Does anyone know if this is possible?

Custom Variables are likely not the route you want to go. They don't make their own calls; they are packaged along with other requests. That is, you'd set a custom variable to signify a single state for a whole page, session or lifetime, not for particular events. Like, for example, if you want to assign a variable to users who are logged in, so you can segment their behavior easily.

What you're looking for is Event Tracking . They behave somewhat like pageviews, but they have up to 4 data points allowed (category, action, label, and value). This allows you to do things like pass the video's time stamp, track particular actions like enable/disable captions, play, pause, etc. And, with secondary dimensions and advanced segmentation, they offer just as much customization as custom variables.

Yes. You're most likely dealing with an implementation of custom variables in Google Analytics.

Here's an example of how Yottaa used custom variables to measure page load time, which is also a JavaScript-based event.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM