Google Tag Manager Integrations

GTM Live Streaming Instructions

  1. Go to your Google Tag Manager and select "Tags" section to create a new tag.  Click "New".
  2. Look for the “Immerss Live” tag and select it.
  3. Select or create a trigger for the page where the player will be placed.
  4. Go to your Immerss back office and select Streaming > Channels > “Any channel” and copy “GTM player code”.
  5. Paste the copied code from the previous step on the page for which the trigger was created.
  6. Save the tag and publish.

GTM Tracking Order Instructions

  1. Go to Immerss back office and select Settings > Store and copy the Application ID.
  2. Now go to your Google Tag Manager account in the Tags section and create a new tag. Click "New".

  3. Look for the “Immerss Tracking Order” tag and select it.
  4. Enter "Application ID" which was copied from the back office.
  5. Select or create a trigger to display only on the order completion page.
  6. Adding a script on the order completion page:
    <script type="text/javascript">
            function imrsTrackingOrderLoaded() {
                var imrs = new Imrs();
                imrs.addOrderItem(‘{item_id}’, {item_quantity}, {item_amount}, {item_discount});
                imrs.save('{order_id}');
            }
    </script>

    {order_id} (string) Created Order ID

    {item_id} (string) Order item ID

    {item_quantity} (integer) quantity in item

    {item_amount} (float) price of 1 item excluding delivery, taxes and discounts

    {item_discount} (float) discount for 1 item

    Woocommerce example:
    
    <script type="text/javascript">
    function imrsTrackingOrderLoaded() {
      var imrs = new Imrs();
      <?php foreach($order->get_items(array("line_item")) as $order_item_id => $order_item): ?>
        imrs.addOrderItem("<?php echo $order_item_id ?>", <?php echo $order_item->get_quantity() ?>, <?php echo floatval($order_item->get_product()->get_price()) ?>, 0);
      <?php endforeach; ?>
      imrs.save("<?php echo $order->get_id() ?>");
    }
    </script>
    
    Magento 2 example:
    
    <script type="text/javascript">
    function imrsTrackingOrderLoaded() {
      var imrs = new Imrs();
      <?php foreach($order->getAllVisibleItems() as $order_item): ?>
        imrs.addOrderItem("<?php echo $order_item->getId() ?>", <?php echo intval($order_item->getQtyOrdered()) ?>, <?php echo $order_item->getOriginalPrice() ?>, <?php echo $order_item->getBaseDiscountAmount() ?>);
      <?php endforeach; ?>
      imrs.save("<?php echo $order->getId(); ?>");
    }
    </script>
    
  7. Save the tag and publish

GTM Visitor Tracking Instructions

  1. Go to Immerss back office and select Settings > Store, and copy the Application ID.
  2. Go to your Google Tag Manager account - Tags section and create a new tag. Click "New".

  3. Look for the “Immerss Tracking Visit” tag and select it.
  4. Enter "Application ID" which was copied from the back office.
  5. Select or create a trigger to display on all pages of the site.
  6. Save and publish.

GTM Widget Instructions

  1. Go to Immerss back office and select Settings > Store, and copy the Application ID.
  2. Go to your Google Tag Manager - Tags section and create a new tag. Click "New".

  3. Look for the “Immerss Widget” tag and select it.
  4. Enter "Application ID" which was copied from the back office.
  5. Select or create a trigger to display on all pages of the site.
  6. Adding a script to all pages of the site.
    <script type=”text/javascript”>
      function imrsWidgetLoaded() {
        window.Immerss.listViewed = [“12121324334”]; // array of viewed products
        window.Immerss.listWish = [“1232434354”]; // array of selected products
        window.Immerss.listBag = [{id: 41953783939241, quantity: 1}]; // array of items in the cart
      }
    </script>
    
  7. Save the tag and publish.
We use cookies to give you the best experience.