Analytics
2.1K members online now
2.1K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Source code being rewritten as 'direct' when going through third party iFrame

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I am having some issue with a clients site. They are on classic code and they are running their third party cart through an iFrame. 

 

The issue is that since relaunching the site and setting up the iFrame a lot of the traffic from paid search and I think other mediums is being rewritten as 'direct'. I am not sure why. I have the code implemented on another site in the same way and it seems to work I'm not sure what the issue is here.

 

I can paste the code up here but does anyone have any ideas or experience with this happening that can help me out?

2 Expert replyverified_user

Re: Source code being rewritten as 'direct' when going through third party iFrame

Top Contributor
# 2
Top Contributor
Hi, Simon L,

There could be several causes of how a non-direct source becomes direct. Some include moving from an https site to a http site (referrer information is lost going in that direction), or the session breaking due to improper cross-domain tracking, or improperly tagged campaigns, etc. You can simply google "google analytics, campaign direct" to list the bunch of blogs that talk about this issue.

Hope this helps.
Nicky Yuen, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn

Re: Source code being rewritten as 'direct' when going through third party iFrame

Top Contributor
# 3
Top Contributor
Technically, a parent window does not pass referrer information to its frame elements, that's why it's passed as direct traffic.
If you want to maintain source with iframes, you'll need to use cross-domain tracking
https://developers.google.com/analytics/devguides/collection/analyticsjs/cross-domain#iframes
VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

Re: Source code being rewritten as 'direct' when going through third party iFrame

Explorer ✭ ✭ ☆
# 4
Explorer ✭ ✭ ☆
If all of above fails you may want to check if iFrame cart's URL is added in your property's 'Referral Exclusion List'.