The cmStartTagSet()
and cmSendTagSet()
functions allow multiple tag function calls in one page to be combined into a single GET Image Request.
By default, each Digital Analytics tag function call creates one HTTP or HTTPS GET image request. The cmStartTagSet()
function is called before the first tag function call in the set. The cmSendTagSet()
function is called after the last tag function call in the set to combine and send all the tags in a single request.
Example HTML and JavaScript Code for a typical e-commerce cart scenario
<script type="text/javascript">
cmStartTagSet();
cmCreatePageviewTag("cart");
cmCreateShopAction5Tag("ProductID-1","ProductName-1","1","99",
"Sample Category ID");
cmCreateShopAction5Tag("ProductID-2","ProductName-2","1","99",
"Sample Category ID");
cmCreateShopAction5Tag("ProductID-3","ProductName-3","1","99",
"Sample Category ID");
cmDisplayShops();
cmSendTagSet();
</script>
Following is the generated browser GET image request, combining 4 tags:
http://testdata.coremetrics.com/cm?ci=99999999&st=1447265738391&vn1=4.18.130&
ec=utf-8&vn2=e4.0&pi=cart&ul=http%3A%2F%2F127.0.0.1%2Feluminate-files%
2FDemo_cmStartTagSet-cmSendTagSet.html&tid=1&rnd=1447269223666&tid=4&pr=
ProductID-1&
pm=ProductName-1&qt=1&bp=99&cg=Sample%20Category%20ID&at=5&pc=N&rnd=
1447270061861&tid=4
&pr=ProductID-2&pm=ProductName-2&qt=1&bp=99&cg=Sample%20Category%20ID&at=5&pc=
N&rnd=1447271506586&tid=4&pr=ProductID-3&pm=ProductName-3&qt=1&bp=99&cg=
Sample%20Category%20ID
&at=5&pc=N&rnd=1447275254349
Comments
0 comments
Article is closed for comments.