06-10-2016 09:44 AM - last edited on 07-20-2016 11:54 AM by kathleen
we are using Tealium iQ in a Angular single page application (through the Tealium Angular module). This workes fine, but now I ran into problems. I want to submit additional parameters to the Google Analytics tag and created an UDO variable to map to the tag and store the value. I use the "Set data value" extension to populate this parameter on the corresponding page. But after the value is set the first time, it gets send every page view.
I tried do debug the code to understand the behaviour. The extension is scoped to the GA tag and the value is set in the b object local to this extension as expected. In the u.send function in the GA tag template the values of the b object are set to the corresponding parameter name in the u.data object. If I inspect the u.data object at the end of the u.send function, I see that the parameter is only set on the specified pages, not on the other ones. However, if I look in the Google Analytics network call, I can see that the parameter is transmitted on every page view after it is set the first time.
Am I missing something? It seems to me that the values of u.data are used to create the call, so I don't understand how a value that doesn't exist in this object can get send to GA.
I even created a second "Set data value" extension which is executed befor the other one to clear the value, but this didn't help. Can you give me some hint what I am doing wrong?
Solved! Go to Solution.
06-10-2016 12:00 PM
Our engineers have been working on utag to make it work better with single page apps. Check the version of your utag
// from developer console on your webpage use the following utag.cfg.v
This article desribes some of the version updates:
06-12-2016 11:45 PM - last edited on 06-13-2016 01:32 PM by kathleen_jo
although I saw the release notes some time ago, I missed the updates to SPA websites.
We are currently still using 4.39 and I will try to update to the current version this week and see, if this solves our problem.
Thanks a lot,
06-14-2016 10:01 AM
I had the chance today to do the upgrade to utag version 4.41 and deploy it to our dev environment. It didn't solve our problem but at least I could debug enough to identify the cause of the problem, although I am not sure how to solve this.
The problem is, that in the single page application, the Google Analytics tracker object is only created once at the first page load. If I set a parameter, it will be send on every following page view and it only ever changes its value if I overwrite it with a different value. The reason for this is, that Tealium iQ only maps parameters if they are populated.
So, even if I create an extension that sets the parameter to undefined or an empty string, Tealium iQ won't update the tracker object.
This behavior is fine for the mapping of query string parameters of several tags, however it doesn't work with the stationary Google Analytics object.
I have no clue how to solve this without messing with the tag template.
Any input would be appreciated.
07-20-2016 02:27 PM
Hi @ahrasch. Here are some articles about how to create arrays in Tealium.
Please let us know if this helps or not.
Hello @tarunkumar605. Thank you so much for the assistance!
07-21-2016 03:57 AM
So, I think what you actually need is to change your mappings from "contentGroup#" to "pageview-contentGroup#".
What this will do is stop using the "old/defualt" behaviour, and change to setting this on a pageview event, instead of the "set" command, which, as you are seeing, will send that value on all requests.
Other options include "transaction-"/"link-"/"enh_".
I've put a request in to update the toolbox to reflect these options, so it will be similar to that of the metrics/dimensions mappings tabs.
07-21-2016 05:07 AM
many thanks for your answer. I haven't seen any documentation of this feature, but it seems to be exactly the solution I was looking for. After a first quick test it looks very promising that this will solve our problems.
Do you have any further information regarding this feature?
07-21-2016 05:35 AM
I'm afraid there isn't any further information around this. I will request that the document:
Is updated with the information.
07-21-2016 05:42 AM
You should definitely update your documentation as I think there will be others encountering this problem too.
However I accepted your previous post as a solution as it does what I was looking for.