Universal Analytics tracking for embedded Flash content - javascript

We have a Flash (Flex) application embedded on a webpage. The webpage already has our Universal Analytics JavaScript code, and now we want to also track the application's events using Universal Analytics.
We can implement event tracking in the application directly using the Measurement Protocol. However, I'm wondering if that would mean that the stats coming from the application would be considered separate from what's coming from the Universal Analytics ga object on the page, i.e. not attributed to the same user/visitor.
Would it make sense to implement an approach where AS3 code would invoke methods of the page's ga JavaScript object instead?

Related

Event Tracking with Google Analytics in a Standalone HTML App

I work with internet connected touchscreens that can run HTML projects. The HTML projects must be self contained in that all assets like scripts, css, images, videos, etc... must be in the local file structure on the hardware in case the unit loses internet connectivity. The units have a built-in web server for this basic use with a chromium browser.
I'm wanting to track events on specified DOM elements using Google Analytics so those events can be recorded when the unit has an active internet connection.
For example... If a button is clicked to perform some sort of action on the page and in that action I want to include an audit call to send that event to my GA account. Pretty standard use of this: https://developers.google.com/analytics/devguides/collection/analyticsjs/events
However, I can't seem to figure out how to make this work on a page that isn't hosted on a typical website. Everything I'm finding doesn't deal with this specific scenario and always relies on a page hosted on a typical site.
How can I track events using Google Analytics on a standalone HTML page?
Thanks,
~Mike
Can you try with sending your events by using Google Tag Manager to Google Analytics.It is quite easy to implement.
Try with adding the Google Tag Manager code, you get once you create the account in tag manager.And add your analytics property id to a custom variable in tag manager.Then create a page view type tag with analytics property id.
sample link for your reference https://support.google.com/tagmanager/answer/6102821?hl=en
Once you are able to link tag manager to your HTML page you can start tracking the page view event.Similarly, you can track other types of events.

Google Analytics - how to track across domains when we use Universal Analytics and other domain uses Traditional?

We're trying to track users across domains from our site to another domain (payment processor). We are using Universal Analytics (analytics.js) but the other site is using Traditional (ga.js). In fact they are using both, but they are using ga.js to register our GA ID and universal to track their GA ID.
If both parties were using Universal Analytics then it could be accomplished by appending a _ga=$_gaCookieValue url parameter to all links pointing from our site to theirs. Since they are using ga.js for our GA Id this url parameter is not getting picked up and registered on their site.
Does anyone know how we might solve this mismatch? We're pressing the other site for help but have come up short so far.
ga.js does not support this type of communication with analytics.js, so what you're asking to do is just not possible without a lot of hacking or manual implementation on their part, which would be a total waste of time since it'll be much easier for them to just upgrade their implementation to analytics.js and then use the officially supported Linker plugin to get out of-the-box, cross-domain tracking.

Google Analytics with SPA (Angular.js)

I've built a SPA website using Angular.js.
How can I configure Google Analytics to identify every page change?
When you deal with SPAs you should avoid firing a pageview when the webpage is loaded in the user's browser because in your Google Analytics reports only the first view will be shown (e.g. index.html). As Google suggests, you should use virtual page views. For Angular specifically, you can do that by dropping the pageview tracking code in your View Router.
If that sounds too complicated, you can take a look at Angularlytics. With a simple configuration and inclusion of the module into your Angular application, all of your views will be tracked automatically.

How do you track how many sites have an actively embedded iframe widget?

I have an iframe widget that is being embedded in over 3000 third party sites, but I want to know exactly how many sites it is embedded in.
Our current method is to use google analytics to generate a list of referers, and have a script manually curl each url in the list to look for our widget.
Another method we were thinking of is to use php to print a $_SERVER['HTTP_REFERER'], and use javascript to fire an analytics event if it determines the page is in an iframe, but as the referer can be manipulated, I don't know how effective it would be.
Thanks!

Google analytics embedded external SWF

Here is my problem. I have a SWF file that I want to do some event tracking on in Google analytics. It has to go into a CMS and I am unable to insert the google tracking code on that page.
I am wondering if there is a method I can use perhaps using an external site and embedding the SWF in order to make calls to the Google Analytics on a remote server and track the events?
Thanks
There is a component for doing Google Analytics event tracking from within the swf, without having to insert tracking code in the page:
http://code.google.com/apis/analytics/docs/tracking/flashTrackingIntro.html
There is a way to this externally, using the External Interface or getURL methods inside flash.
They can call Javascript functions from the HTML page that contains the .swf embedded.
All you have to do is create a function that runs the code snipped from Google Analytics, and call that function from within your flash, as simple as:
getURL("javascript:Your_Function_Here");
Augusto Roselli - WebAnalytics - dp6

Categories

Resources