Tracking UTM paramaters in iframe with own Google Analytics - google-analytics

I'm having issues with tracking the UTM parameters in Google Analytics on an iframe.
My website is embedded in an iframe on http://www.blokker.be/inuwkot and http://www.blokker.be/danstonkot. The visitors go straight to the two links (either dutch or french). No visitors go straight to my own domain.
In the overview page form analytics I can view the amount of visitors/views but not the UTM parameters. I can only see it's a referal.
Any ideas on how to get the UTM url's working in the iframe so I can see where my visitors come from?

Since your frame content is located on a different domain you can not track url parameters from the hosting page without support from the domain owners - they would either have to append the parameters to the frame url, or send a message using the postMessage interface which allows cross-domain communication between pages and embedded frames.
So the page has to send the information to the frame, you cannot simply access it (for security reasons). If the owners of the blokker.be domain do not support that then you are out of luck.

Related

Can't track in Google Analytics data from GetResponse

Our email marketer is sending email from GetResponse with a tracking code generated from another tool,
but we can't see if the users are coming from the email source.
Is it possible, because it is with tracking code generated from other tool, GA to mark it as direct traffic and is there a way to know it is coming from the email campaign? Also, I am not sure it is tracking it at all, becouse I don't see much traffic in the landing page. The GA is fired, I checked!
The tracking code includes the main domain and it redirects to a specific page.
Example: tracking.ourdomain.com/aff_c?offer_id=46&aff_id=76
You have to check in Landing Pages report (or All pages report), filtering by aff_id, if there are any sessions.
To track in correct mode the source you have to use UTMs parameters. You can build your URL with UTM parameters using this tool. It allows you to easily add campaign parameters to URLs so you can track Custom Campaigns in Google Analytics. Then you can find those sessions in source / medium report.

Google analytics Direct vs Referral traffic for 2 sites being on same domain name

I have a site abc.com e.g. It has a UK and US variant with different content and based on country of access directs to abc.com/en-gb or abc.com/en-us.
Now in the site in the footer there is a link to our App-store website. Now that website too uses the same primary domain name of abc.com but at the proxy based on URL directs it to a completely separate installation of a stand-alone site which is abc.com/app-store.
Both the sites have different GA tracking code enabled. the abc.com corporate site has GA360 (Analytics pro) while the abc.com/app-store uses regular GA account. Basically no way the 2 are connected.
Now what I see is any traffic coming from abc.com/en-gb or abc.com/en-us to abc.com/app-store is being recognised as "Direct" traffic type in GA. While actually it is a "Referral" though they are both sites owned by us.
We need to somehow measure the traffic being sent to our app-store from our corporate site in the GA in the app-store for reporting purposes. We can track traffic sent from abc.com in the GA360 enabled on abc.com/en-gb and /en-us but then it is a different GA account and data store and needs manual sync up.
I had thought of using utm campaign source/medium - but that is giving false impression of bloated traffic as the UTM URL paramters remain even after landing on the destination site and for any filtering operation on the site it keeps reloading - giving the false impression of traffic coming from abc.com.
Any advice?
The reason abc.com/app-store GA account shows this in 'direct' because the referrer is the same domain. And Google will consider this as self-referrer.
GA doesn't care if you have 3 different GA set up in 3 different pages but the domain from which it is referred to, if it is different then it is fine else it considers it as 'direct'. Equivalent to user opening a bookmark.
How to solve this,
Use outbound event tracking on abc.com/en-gb & abc.com/en-us. But it will lead to manual merging of the data.
As UTM parameters are messing up your app store campaign data and filtering options, you can go with the ref parameter. I usually use it for tracking internal navigation. for example - abc.com/app-store?ref=main_site. You can easily filter out ref parameters from your view or create a segment. And it is considered different than the original URL, so no clashes.
Hope this helps

Google Analytics : How to track image/PDF URL is accessed?

I am sending an marketing Email attaching an image or PDF URL.
Is there is any way to track how may users viewed/clicked this page via google analytics ? I could see the number of page view who accessed html pages but seeking for a way to find how many of them accessed image or PDF URL?
Including a link directly to a pdf or image will simply open the resource without JavaScript tracking or cookies required for Google Analytics.
You would need to send a GA hit from your server in response to the request for those files - neither trivial nor recommended in this case
Rather send the link to a page on your site containing the content.
Tracking that in GA is trivial and is likely already set up on your site.
If you need to have the content in a PDF rather than on the web page directly, have a link to the PDF and track that as an event or Virtual Page View
I would also recommend tagging the link in your email with GA UTM Campaign Parameters to identify the traffic from that link
If your question is about tracking the email itself, please restate the question.

Google analytics in iframe content (different domain)

I have been reading some google documentation on tracking via google analytics, but still hasn't have a clear understanding of what's happening, I will put this in plain english so that my query can help others as well.
Basically I have 2 sites: siteA.com (parent), and siteB.com (child)
I have created a widget on siteB.com, i.e. siteB.com/widget. Let's say in this case I embed siteB.com/widget on siteA.com (home page)
<iframe src="http://siteB.com/widget"></iframe>
And on siteB.com, I have the relevant google analytics installed. So my question is:
Will siteB.com google analytics be able to register siteA traffic? (one traffic to siteA.com equals to siteB.com/widget.)
Many thanks!
Short Answer : No, It is not as simple
For cross browser tracking:
https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite?csw=1#trackingIFrames
In a site where the transfer between domains is done by opening a new
window or by including content in an iFrame, you will need to to
use the _getLinkerUrl() method to transfer visitor and campaign
cookies from one domain to another. For example, suppose you include a
form in an iFrame that is hosted on www.my-example-iframecontent.com.
In order to transfer visitor information from the parent page that
hosts the iFrame on www.example-parent.com, you would use JavaScript
to load the iFrame and pass in the cookie information using the
_getLinkerURL() method.
There are different ways to setup and it all depends on your configuration. Therefore, I suggest that you setup some test profile and experiment with your settings.

how can I know where users come from if they are coming from another website of mine?

I have two websites, website A and website B, the website A is a hotsite that is linked to website B, where the sales happen.
We need to know how the user got the website A and turned into a customer in website B(it means he bought something), so we can mesure the good sources to invest.
as the developer, I have access to these two websites source-code and can implement any google-analytic tag on them.
Thanks,
Jonathan
Web browsers generally send a referrer header, which contains the URL of the page which linked to the current page.
You can access this in the HTTP requests made to site B, and track sessions differently when the first page load is referred by site A. You can also access a document.referrer property in JavaScript, and use it to manipulate your analytics.
The correct way to implement this in Google Analytics is to configure the trackers so that they work cross-domain.
This will allow you to see all the information about where the converting visits originally came from and their path to purchase.
If you don’t use cross-domain tracking or you have it improperly configured, you’ll end up with meaningless data that shows self-referrers in the visit reports and a lack of proper attribution towards your conversion points.  As a visitor moves from your primary domain to the other, they will start a brand new session in Google Analytics.
...
If a visitor clicks an ad or performs and organic search and ends up viewing a page on the www.3rdpartycheckout.com after viewing pages on www.primarydomain.com, you lose ALL data about how that user arrived and the complete picture of what they did.  If they end up converting, you will only know that they came from www.primarydomain.com (which is not helpful at all).
http://www.blastam.com/blog/index.php/2011/02/google-analytics-cross-domain-tracking/
Have the landing page on website B look at the referrer tag and if its website A then use a separate Google Analytics instance on website B for all sessions that were sourced from website A.

Resources