Tealium - utag is not a function

Topic summary

Issue: Tealium (utag.js) fails to initialize on Shopify Checkout when added via Web Pixels, resulting in “ReferenceError: utag is not defined.”

Context:

  • Tealium is configured and working on all non-checkout pages.
  • In Checkout, the utag.js script appears in the Web Pixel, but the global utag object is unavailable.
  • The checkout_started event runs, but utag.view does not execute because utag is undefined.

Implementation details:

  • A Web Pixels script attempts to load utag.js (from tags.tiqcdn.com/utag/…), using an immediately invoked function.
  • Code snippet (partially shown) references localStorage to choose a “tealium_environment.” The snippet is central to diagnosing the issue.

Status and requests:

  • No solution provided yet; a similar linked thread has no response.
  • The poster is seeking guidance on enabling utag.js/utag.view within Checkout via Web Pixels.

Unresolved: Root cause and fix remain open; no confirmed workarounds or action items from replies.

Summarized with AI on December 27. AI used: gpt-5.

Good day!

I have a problem regarding integrating Tealium (utag.js) in Checkout. So basically, tealium is already setup in all pages except checkout. Now, I managed to add the utag.js script in web pixels, when I check the web pixel the script exists but for some reason when I access the functions of utag.js it just indicates:

ReferenceError: utag is not defined.

Here is my implementation in Web Pixels:

const environment = localStorage.getItem("tealium_environment");

(function(a, b, c, d) {
    a = "https://tags.tiqcdn.com/utag/

checkout_started is executed, but utag.view function is not due to undefined.

Any idea how to fix this? Found a similar issue with this but no response: [Tealium Datalayer Integration on Checkout Pages](https://community.shopify.com/post/2546727)

Highly appreciate the help :blush: