Active Load Rule not loading if not scoped to a tag

Gold Contributor
Gold Contributor

I have several load rules which are not scoped to tags.  Instead, they are used in the currency converter extension only. 

Here's the problem: If they are not scoped to a tag, they will not be included in the utag.js and thus the currency converter extension conditions will never evaluate to true. 

 

The load rule's conditions are so that they check if country = x and currency = y. Each one for a different country/currency combination. So they are mutually exclusive and I cannot scope all of them to the Currency Converter Tag for example. 

 

Workaround is to have one converter tag for each load rule or create a "ghost" generic tag to which all of the load rules are applied (so it would not load and the load rules will be included in utag.js).

 

Have I overseen anything or is this the way to follow?

Many thanks in advance for your thoughts.

Jean-Marc

 

8 REPLIES 8

Active Load Rule not loading if not scoped to a tag

Bronze Contributor
Bronze Contributor

Hi @jmbolfing,

 

If I understand your issue correctly, it might be an order of operations issue. Have you checked when this extension loads? Load rules should all be loading to the page, but do so after the data layer evaluates. Extensions can be set to evaluate before or after the load rules. In this case, if you have a variable in the UDO called "country", for example, and the load rule is "if country is Brazil", the currency extension to convert US dollars to Brazil Real relies on that data being available, so the extension would need to evaluate "after load rules".

 

Let me know if that helps or if I've misunderstood your question!

 

 

Best,

Kayleigh

Active Load Rule not loading if not scoped to a tag

Gold Contributor
Gold Contributor

Hey @kayleigh

Thanks for your input. Yes, I thought the same thing and it took me a while to get to the point where I discovered that the load rules are simply not contained in the utag.js (in the "utag.loader.loadrules" part of the script). They're just not there. Even if they are active. But once they are scoped to a tag, they are.

Cheers...Jean-Marc

Active Load Rule not loading if not scoped to a tag

Moderator
Moderator

I liked it so I put a kudo on it @kayleigh! #DidYouSeeWhatIDidThere #teehee

If you liked it then you should have put a kudo on it!

Active Load Rule not loading if not scoped to a tag

Employee Emeritus

AAaaahhhh @tamedbeast. Indeed. <sigh>

 

@kayleigh and @jmbolfing thank you both for your informative replies and answers. Much appreciated. Let us know if you have any other questions!

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.

Active Load Rule not loading if not scoped to a tag

Bronze Contributor
Bronze Contributor

Thanks @kathleen_jo and @tamedbeast

 

I saw you marked my answer as the solution, but I don't think that I did actually solve @jmbolfing's problem. Do you all have any insight? I've been trying to do some experimentation in my sandbox, and I can reproduce the issue he's having.

Active Load Rule not loading if not scoped to a tag

Tealium Employee

It's true - to optimise the code, if a load rule is not scoped to a tag, the code isn't generated as part of utag.js as (in theory) it's not being used. 

 

In practice, of course, people reference load rules in extensions. 

 

There are two ways around this.  The easiest is to create a 'dummy' tag using the Tealium Custom Container tag, and simply don't customise it - it's basically left as a blank template that doesn't do anything, but if you scope it to the load rule, it will legitimise the load rule and make the publishing system build the code. 

 

The other way is to reproduce the load rule as part of the extension - many extensions can use conditions which you can set to reproduce the criteria of the load rule. This is arguably neater, although possibly not so obvious. 

 

 

 

 

Connecting data systems since the 1980s.

Active Load Rule not loading if not scoped to a tag

Employee Emeritus

Nice @steve_lake. Thank you for the reply!

 

@kayleigh what @steve_lake said! ROFL 

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.

Active Load Rule not loading if not scoped to a tag

Tealium Employee

@jmbolfing @kayleigh @steve_lake

 

Just to close the loop at bug fix has been raised for this.

 

Adrian

Ask me anything Tealium related or TypeScript/JavaScript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.
Public