Skip to main content
Contributor II
January 4, 2021
Solved

I cannot get the web tracking to work with shopify

  • January 4, 2021
  • 14 replies
  • 1213 views

I managed to integrate my shopify account with Klaviyo but even after pasting the snippet code into product.liquid in the shopify theme, the web tracking won’t successfully get set up - it just says ‘waiting for data’ at the bottom and won’t receive anything. 

What should I do?

    This topic has been closed for replies.
    Best answer by quagrowth

    You can check the active on site metric or viewed product metric to see if anyone qualifies. It might take some time to render the changes

    14 replies

    Contributor I
    January 1, 2022

     

    Hey Alex,

     

    I’ve managed to get the code right in the Dawn Template that is a Shopify 2.0 theme via the main-product.liquid file.

     

    However, it’s taking forever at the Setup Web Tracking part wherein I am constantly at the “Waiting for data...” screen for ages. What could be the problem there?

    alex.hong
    Klaviyo Alum
    January 3, 2022

    Hi there @bennylee!

    Is your page possibly a password protected site?  You'll need to continue with the steps to add the product tracking for your Shopify store, then check the installation when the site is live: How to Integrate with Shopify.

    If not, it could be that the onsite snippet for activity tracking was not installed.  Could you try unchecking both options here and updating? Then, enable both, and update once more.  Once you do that, search your HTML here for "onsite": view-source:https://www.yoursite.xyz. At this point, it is important to check that you do not have two versions of the klaviyo.js snippet installed. Having two versions of the JS installed creates a "race condition," so they have to compete to decide which will load on the page every time a users views your site. When one account's JS "wins," that will cause issues with anything you've set up through the other integration. But, if you don't see anything you can manually install it by pasting the following script in your index.liquid file: 

    <script type="text/javascript" async 
    src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=XXXXXX"></script>

    Please let me know if that helped!
    Alex 

    Contributor I
    January 4, 2022

    Hi there @bennylee!

    Is your page possibly a password protected site?  You'll need to continue with the steps to add the product tracking for your Shopify store, then check the installation when the site is live: How to Integrate with Shopify.

    If not, it could be that the onsite snippet for activity tracking was not installed.  Could you try unchecking both options here and updating? Then, enable both, and update once more.  Once you do that, search your HTML here for "onsite": view-source:https://www.yoursite.xyz. At this point, it is important to check that you do not have two versions of the klaviyo.js snippet installed. Having two versions of the JS installed creates a "race condition," so they have to compete to decide which will load on the page every time a users views your site. When one account's JS "wins," that will cause issues with anything you've set up through the other integration. But, if you don't see anything you can manually install it by pasting the following script in your index.liquid file: 

    <script type="text/javascript" async 
    src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=XXXXXX"></script>

    Please let me know if that helped!
    Alex 

    hey @alex.hong,

     

    Thank you for reaching back. Your suggestion for Unchecking and then Rechecking the “Automatically add Klaviyo onsite javascript (recommended)” sort of did the trick - managed to get “Data Received” (finally).

     

    However, one caveat is that I don’t see the Activity Feed in my Klaviyo dashboard updating, however, when I launch the link generated via “3. Once you've added those snippets, enter the URL of your Shopify store below:” in Setup Web Tracking via an Incognito Window, I can see live updates on my Activity Feed. Is this cause for concern or should I be fine as long as I’ve got the “Data Received” confirmation?

    alex.hong
    Klaviyo Alum
    January 4, 2022

    Hi there @bennylee,

    Glad you found it helpful!

    I would also recommend to manually check if the Klaviyo.js is present through self cookieing as opposed to using a “checker”. Although the checker is typically reliable, we still recommend manually checking if you have any doubts. The activity feed should be find as long as you’re seeing the data received but again I would check manually as well.

     

    Have a good day!
    Alex