Description: This article describes the steps to add InnovidXP response and action tags within Shopify. 

InnovidXP’s Javascript-based web tag measures total visits to a website. Only one visit tag is needed per website, and it must be implemented on all pages of your website to measure total visits. The web and action tags fire on the page(s) they are placed while obeying the required opt-in/opt-out mechanisms. Any comparison of web volumes and Google Analytics is on a like-for-like basis, as the tag is intended to interact in a consistent way with the consent criteria.

Note: Action tags are optional and can be added once a response tag has been added. Using action tags varies depending on the partner and the terms of the agreement, so we cannot guarantee you will be able to implement action tags.


Adding a web tag in Shopify

This section explains the following:

  • Adding the web tag
  • Checking the web tag

Adding the web tag

  1. Login to your Shopify account.

    Note:
    Ensure you are also logged into the Innovid platform and have copied the InnovidXP web tag code. (Navigate to Data > Responses > InnovidXP Tracker Instructions and select Response tracking - Step 1  > Desktop & Mobile website and copy the code, as shown below).

    Visit tag code:


  2. Within Shopify, navigate to Administration > Online Store > Themes.
    2024-04-30_11-49-22.jpg

  3. Within the kebab menu, select Edit Code.
    2024-04-30_11-51-28.jpg

  4. Select the theme file, usually named theme.liquid.
    2024-04-30_11-56-53.jpg

  5. Paste the InnovidXP website visit tag code at the bottom of the theme file code, for example:
    2024-04-30_12-00-29.jpg

  6. Select Save to save your changes. the changes by selecting the Save button.

Checking the web tag

  1. Refresh the Shopify page and preview the store.
  2. Right-click anywhere on the page to open the menu and select Inspect > Network.
  3. Type “TV2” into the Filter textbox and refresh the page. 
  4. If it has been successfully added, you will see the tag listed with the associated collector ID.

Adding an action tag in Shopify

This section explains the following:

  • Adding the action tag
  • Checking the action tag

Action tags are optional and can be added once a response tag has been added. Using action tags varies depending on the partner and the terms of the agreement, so we cannot guarantee you will be able to implement action tags. Action tags fire on the page(s) they are placed while obeying the required opt-in/opt-out mechanisms.

Adding the action tag

  1. Log into your Shopify account.
    Notes:
    - A response tag must be implemented before an action tag can be added. To check if you have an existing response tag, follow the steps in the section Checking the tag. The collector ID shown should correspond to the client ID within the InnovidXP platform.
    - Ensure you are also logged into the Innovid platform and have copied the InnovidXP action tag code (Navigate to Data > Responses > InnovidXP Tracker Instructions and select Action tracking - Step 2 > Desktop & Mobile website and copy the code as shown below).

    Action tag code:
    2024-04-30_12-09-56.jpg
    Some more details about the action tag and placing it can also be found on that page.

  2. Within Shopify, navigate to Administration > Online Store > Themes:
    2024-04-30_11-49-22.jpg

  3. Within the kebab menu, select Edit Code.
    2024-04-30_11-51-28.jpg

  4. Find the file where you want the action to be tracked, for example, the Contact Us form.
  5. Navigate to the code associated with the item where you would like the action to be tracked, for example, the Submit button.
  6. Add the onclick event to the button code and name the function, for example, ‘contactusactiontag’. This function name cannot contain any spaces or special characters.
    2024-04-30_12-49-33.jpg

  7. Create a script tag below the code block that contains the above onclick event function and add a function with the same name as in the previous step, for example, ‘contactusactiontag’, within this script.  You can use the following template:

    <script> 
    function nameOfTheFunction(){
    "Insert the pixel here"
    }
    </script>


  8. Paste the copied action tag code within the function created in step 7.
  9. Modify the parameter  <ACTIONNAME> to reflect what is going to be tracked, for example: 
    Change the following var actionname = '<ACTIONNAME>';
    to:
    var actionname = 'contactus';

    Note: The action name cannot contain spaces or special characters. If extra values are needed, replace the <PLACEHOLDER> within the tag parameters with your internal code. If these are unnecessary, replace the <PLACEHOLDER> with an empty string.

    Parameters
    Details How to track

    <USERREF>

    An internal user ID

    <ACTIONNAME>

    The name of the action - this must be included
    <REVENUE> Any revenue generated by the action
    <PRODUCT>
    The product name for the action - a maximum of 15
    <ACTIONID> An internal ID for the action, for example, the order number
    <PROMOCODE> The promo code for the action, if applicable

    The added code should look similar to the following:
    2024-04-30_13-12-31.jpg


  10. Select Save to save your changes.

Checking the action tag

  1. Navigate to the Shopify page where you added the action tag.
  2. Right-click anywhere on the page to open the menu and select Inspect > Network.
  3. Perform the action, for example, select the Submit button.
  4. The action tag should appear within the list of tags in the Network console.
  5. Select the Payload tab and scroll to the “cvar” field, where the action tag created above should be visible, for example:
    2024-04-30_13-16-01.jpg

Related content

Getting Started: Integrating with InnovidXP

Was this article helpful?
0 out of 0 found this helpful