javascriptjqueryhtmlanalyticstealium

how to check dynamically added tealium utag submitted or not?


My web page I am using Tealium for tracking visitors details. It is a AJAX based site. So I am dynamically passing utag on click event.

$("#test").click(function() {
  var utag_data={
  site_region:"USA",
  site_currency:"USD",
  selected_language:"en_US",
  page_name:"test1",
  page_type:"test2",
  product_sku:  ["1506742"],
  product_name: ["test3"], 
};
utag.view(utag_data);
});

Is there any way to test my data is populating correctly or not?


Solution

  • You could check out what the tag is generating by using the console log function.

    $("#test").click(function() {
      var utag_data={
      site_region:"USA",
      site_currency:"USD",
      selected_language:"en_US",
      page_name:"test1",
      page_type:"test2",
      product_sku:  ["1506742"],
      product_name: ["test3"], 
    };
    console.log(utag_data)
    utag.view(utag_data);
    });
    

    This code should help you see the object being created and it's values. You can then just compare it to what the API expects.