Analytics
1.7K members online now
1.7K 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

One page application campaign & referrer tracking Issue

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

One page application campaign & referrer tracking

 

We (Google Analytics Premium) use onepage- Angular JS Landingpages with an URL like that:

 

subdomain.topleveldomain.de/#/String/?param1=date&param2=2d&pram3=string&param4=number&param5=string...dd.mm.yyyy&utm_medium=string&utm_source=string&utm_campaign=string

 

So as you can see the Landingpage-URL is using a fragment and the utm-parameters are placed behind the fragment. 

To avoid problems with utm-parameters and the hash we used the allow-Linker = true field in our page view tags in GTM.

As soon as a user enters the landing page Google uses the utm-parameter as expected. 

 

BUT as soon as a user is interacting with the site like picking a filter, the parameters behind the hash change and the utm-parameter aren’t shown in the URL anymore. 

After this interaction and change of parameters in the URL, Universal Analytics picks the document.referrer which is given in the backend instead of referring to the UTM-parameter which were used for entering the landing page in the first place.

 

Does anybody have some experiences on one page- Angular js. Application website tracking and do know a solution for this problem as we suffer a huge loss on Source-Data.

 

 

We would appreciate any idea Smiley Happy

1 Expert replyverified_user

Re: One page application campaign & referrer tracking Issue

Rising Star
# 2
Rising Star
Hey Sarah,

As a premium user, you are entitled to some support from your re-seller or from Google.

That said, have you checked out Google's guide on single page applications? See the warning about updating the referrer (in case you folks are doing that.)
https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications

Also you may want to consider using the history change listener and passing in changes in state as a virtual pageview. It could help you construct funnels, etc.

More on that here from the man on the topic, Simo Ahava:

http://www.simoahava.com/gtm-tips/track-url-fragments-as-pageviews/#update


Best,

Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn