Want to merge two utag.view calls from tealium

Gold Contributor
Gold Contributor

We have a marketing campaign widget on home page and is dispayed to users if they fullfill some criteria.

So i have made an "javascript code extension" and have written following code to track once it appears to the users. Scope is: Adobe Analytics App Measurement Code.

if(jQuery('div.grid-stack-item.marketing-widget.ui-draggable.ui-resizable.ui-resizable-autohide.ui-resizable-disabled').is(':visible'))
{
s.pageName ="Home";
s.events="event33";
s.prop8=s.eVar8=window.location.host+window.location.pathname;
s.eVar11 = window.location.hostname.split(".")[0];
s.t();

}

So i am getting one page load call each time marketing campaign widget is shown to user.

Also i am getting one more page load call from Adobe Analytics App Measurement TAG on every page. 

So the ASK is if user see "marketing campaign widget" then both the page load call should be merged otherwise default call from Adobe Analytics App Measurement TAG should fire on Home Page.

 

Let me know the solution to handle this case.

Thanks.

7 REPLIES 7

Want to merge two utag.view calls from tealium

Tealium Expert
Tealium Expert

Hi @parth_gupta199 ,

Great question. Here is my recommendation. Remove the s.t() function from the marketing campaign widget code and see if it works. This would prevent triggering an individual analytics call for the widget. As you are setting the eVar variables for widget, that should be automatically populated on the App Measurement tag when triggered.

My assumption is, whether the widget is visible or not is known before the Adobe Analytics App Measurement TAG is fired.

Hope this works. If not just let me know. We may need to find custom solutions based on the order of execution.

Thanks

Abraham

Thanks & Regards
--------------------------------------------------
Abraham Easo
Principal Consultant
Numeric Analytics, LLC
Bartlett, IL (CST)
m: 980-422-2044
Abraham.Easo@numericanalytics.com | http://www.numericanalytics.com
Adobe Analytics Architect/Tealium Expert/Ensighten/Google Analytics Certified

Want to merge two utag.view calls from tealium

Gold Contributor
Gold Contributor

Thanks for the quick reply.

But removing s.t() from marketing campaign widget does not solve the problem. Not able to see both the calls getting merged. Scope for Marketing campaign widget is Adobe App Measurement only.

We have same evar and prop for both the calls, the only difference is in marketing campaign we are populating an extra event33.

Want to merge two utag.view calls from tealium

Gold Contributor
Gold Contributor

HI,

Mentioned code looks fine except the s.t(); fucntion which shouldn't pass on the view section. Also, it would be dupllicate to your page view count as well. Just remove and check how the tags fire on the visible.

Thank you,

Jay.

Want to merge two utag.view calls from tealium

Tealium Expert
Tealium Expert

You are very welcome @parth_gupta199. Good to know the additional context about this requirement.

jayap3, Totally that the same thought i had in my mind. 

@parth_gupta199 Here is another approach to test out. In order for the event33 to be added to the app measurement tag, i would recommend using a event data layer variable and then map that variable to event33 within the Adobe Analytics App Measurement TAG. Please find below some examples.

Extension should be updated as below:

if(jQuery('div.grid-stack-item.marketing-widget.ui-draggable.ui-resizable.ui-resizable-autohide.ui-resizable-disabled').is(':visible'))
{
b.event_type = "campaign_widget_shown";

}

Data layer: event_type 

image.png

 

Data layer mapping within AppMeasurement tag

Below mapping informs Tealium IQ to send event33 when event_type data layer value is populated with value as "campaign_widget_shown". 

image.png

All the values, data layer variable names given above are just created for this example. Feel free to change the names to the ones that best suits the need.

Let me know if this helps.

Thanks

Abraham

Thanks & Regards
--------------------------------------------------
Abraham Easo
Principal Consultant
Numeric Analytics, LLC
Bartlett, IL (CST)
m: 980-422-2044
Abraham.Easo@numericanalytics.com | http://www.numericanalytics.com
Adobe Analytics Architect/Tealium Expert/Ensighten/Google Analytics Certified

Want to merge two utag.view calls from tealium

Gold Contributor
Gold Contributor
@abrahameaso You are truly a rockstar!! That approach worked for me.

Thanks :)

Want to merge two utag.view calls from tealium

Bronze Contributor
Bronze Contributor
 

Want to merge two utag.view calls from tealium

Bronze Contributor
Bronze Contributor
 
Public