Actions

Container Tag version 2.0

From SVG Media

Contents

About Container

New version of Container pixel makes passing event data to Tyroo easy and flexible.In order to add this container, please ask your campaign manager to give you the new ContainerJS tag.

Assuming your container id is 209, a sample container pixel would look like:


<script src="//ret.tyroodr.com/cont/containerv2.js"></script>

         <script>
                        _tyroo.setContainerId(209);  
                         _tyroo.push({isAttr : 1, type: "s"  , eventName: "purchase", actionkey: "purchase", transactionId: "sdhj234sfdf2312", eventItemJson: [{"productId":    "35800067","productName":"polo sweatshirt ss","productCategory":"Clothing","productSubCategory":"WinterWear","productSubSubCategory":"Sweatshirts","price":200,"quantity":2},{"productId":3580068,"productName":"Levi Jeans 12","productCategory":"Clothing","productSubCategory":"Casual Wear","productSubSubCategory":"Jeans","price":300,"quantity":1}], conversionDateTime: "2015-12-06 15:35:05"}) 


        </script>

Using GTM

In case Google Tag Manager is being used for implementation of pixel, then for an e-commerce player purchase event, it will be as shown below. Variable name in GTM should be replaced after the key . Check for appropriate variable names in GTM for transactionid, cartvalue,currencyCode and product details like product id, quantity etc.


<script src="//ret.tyroodr.com/cont/containerv2.js"></script> <script>

       _tyroo.setContainerId(1856);  
       _tyroo.push({isAttr : 1, type: "s"  , eventName: "purchase", actionkey: "purchase", transactionId:  {{TransactionID}}  , cartvalue:    {{TransactionValue}}  ,currencyCode: 'INR',  eventItemJson : dataLayer[0].ecommerce.purchase.products }) 

</script>

Steps for Integration

  1. Include the above script tag with your container id in the html page where you wish to have containerjs implementation.
  2. Now whenever you want to fire the pixel to Tyroo, just call tyroo.push function with relevant fields.Variable name and value has to be provided as a key-value pair.Complete list of supported variable can be found in the section "Variable List" .For example for purchase event the pixel implementation would be as shown below


         <script src="//ret.tyroodr.com/cont/containerv2.js"></script>
         <script>
                        _tyroo.setContainerId(209);  
                         _tyroo.push({isAttr : 1,  type: "s"  , eventName: "purchase", actionkey: "purchase", transactionId: "sdhj234sfdf2312", eventItemJson: [{"productId":    "35800067","productName":"polo sweatshirt ss","productCategory":"Clothing","productSubCategory":"WinterWear","productSubSubCategory":"Sweatshirts","price":200,"quantity":2},{"productId":3580068,"productName":"Levi Jeans 12","productCategory":"Clothing","productSubCategory":"Casual Wear","productSubSubCategory":"Jeans","price":300,"quantity":1}], conversionDateTime: "2015-12-06 15:35:05"}) 


        </script>


Once the pixel is triggered, a request will be sent to us to register a purchase event for 2 products: Polo sweatshirt and Levi Jeans.Alternatively, in case you do not maintain product details in a json format, you can send the details in our individual CSV PLA parameters : productId, productName, productCategory, productSubCategory, productSubSubCategory, productUnitPrice, quantity, amount :In case multiple product information needs to be passed, then separate the values either with comma ',' or carrot '^' symbol as shown below.


<script src="//ret.tyroodr.com/cont/containerv2.js"></script>

         <script>
                        _tyroo.setContainerId(209);  
   _tyroo.push({isAttr : 1, tyrooAttributionPartnerId :"33", type: "s" ,   eventName: "purchase", actionkey: "purchase", transactionId: "sdhj234sfdf2312", productId:"35800067,3580068", productName:"polo sweatshirt ss, Levi Jeans 12",  productCategory:"Clothing,Clothing",productSubCategory:"WinterWear, Casual Wear",productSubSubCategory:"Sweatshirts, Jeans",productUnitPrice:"200,300",quantity:"2,1",amount:"400,300", conversionDateTime: "2015-12-06 15:35:05"})


        </script>


Example:

Comma separated: productId: ‘634GF77,7JHB6’

Caret Separated: productId: ‘634GF77^7JHB6’

Variable List

Following variables are supported in the pixel. Depending on the event for which you are triggering the pixel, appropriate variables needs to be used.

Attribute Data Type Description Remarks
isAttr boolean Whether this conversion is attributed to tyroo or not. To be filled as 1 or TRUE or YES in case of attributed to TYROO. In case it's not fill as 0, FALSE or NO. In case nothing is filled, it will be considered as attributed to Tyroo and appropriate validations will be done at Tyroos end Mandatory
type alpha numeric Value can be either 's' or 'l'. Here “s” stands for sales and “l” stands for lead campaigns, Mandatory
actionkey alpha numeric event name to be passed Mandatory
eventName alpha numeric event name to be passed Mandatory
eventId alpha numeric event id to be passed Mandatory, if eventName is empty
cartvalue Float Total cart value for the event Recommended
optionalAdver alpha numeric any optional information that you may want to pass Recommended
leadId alpha numeric unique lead id in case of “l’ type campaigns, Recommended
transactionId alpha numeric Unique transaction id in case of “s” type campaigns Mandatory in case type is 's'
attribSubid1 alpha numeric extra information Recommended
attribSubid2 alpha numeric extra information Recommended
attribSubid3 alpha numeric extra information Recommended
attribSubid4 alpha numeric extra information Recommended
attribSubid5 alpha numeric extra information Recommended
checkInDate alpha numeric Time of Check In.Recommend date time format of yyyy-mm-dd hh:mm:ss. Recommended
checkOutDate alpha numeric If multi-date event, time of Check Out.Recommend date time format of yyyy-mm-dd hh:mm:ss. Recommended
productId alpha numeric productid or SKU id or content idseparated by ',' or '^' Highly recommended in case of e-commerce events
productName alpha numeric product or content name separated by ',' or '^' Highly recommended in case of e-commerce events
productCategory alpha numeric product category or content category separated by ',' or '^' Highly recommended in case of e-commerce events
productSubCategory alpha numeric product or content sub category separated by ',' or '^' Highly recommended in case of e-commerce events
productSubSubCategory alpha numeric product or content sub sub category separated by ',' or '^' Highly recommended in case of e-commerce events
productUnitPrice alpha numeric product unit price separated by ',' or '^' Highly recommended in case of e-commerce events
currencyCode alpha numeric Currency Code. E.g for rupees its 'INR' Highly recommended in case of e-commerce events
quantity alpha numeric product quantity ( in case of add to cart or purchase etc event ) or no of guest ( in case of reservation event ) or credit spent ( in case of spent credit event) separated by ',' or '^' Highly recommended in case of e-commerce events
amount alpha numeric product amount separated by ',' or '^'. E.g if quantity is 2 and Unitprice is 100, then amount will be 200 Highly recommended in case of e-commerce events
eventItemJson alpha numeric valid json array with each element describing a SKU object associated with the event. Generally used for e-commerce events Highly recommended in case of e-commerce events
level alpha numeric The event level achieved Recommended
rating alpha numeric The rating related to an app event; e.g. a 4 star rating. Recommended
searchStr alpha numeric Search terms, keywords or query formatted as a string. Recommended
conversionDatetime alpha numeric event timestamp. E,g 'YYYY-MM-DD HH:MM:SS' Recommended
fbUid alpha numeric facebook user id Recommended
twitterUid alpha numeric twitter userid Recommended
googleUid alpha numeric google account id Recommended
userEmail alpha numeric email address of user Recommended
userId alpha numeric userid Recommended
username alpha numeric username Recommended
age alpha numeric age of the user Recommended
gender alpha numeric gender of the user Recommended