// Add these data points to the 'utag_data' object on the page
// Each array needs to be equal in length
var utag_data = {
page_type: "category",
page_number : "1" // may not be applicable as site appears to show all results on one page
product_prices: ["369.00","100.00"], // price(s) of product(s) on page
product_names: ["10-NAVY","12-BLUE"], // name(s) of product(s) on page
product_categories: ["Jackets & Coats","Jackets & Coats"], // categor(ies) of product(s) on page
product_codes: ["120860-10-NAVY", "123213-12-BLUE"], // code(s) of product(s) on page
product_colours : ["NAVY","BLUE"], // colour(s) of product(s) on page
product_positions : ["1","2"] // position(s) on page of product(s)
products_in_category : "100", // how many products are there in this category?
};
// Add these data points to the 'utag_data' object on the page
// Each array needs to be equal in length
var utag_data = {
promotion_ids: ["promo1","promo2"], // ID(s) of promotion(s) on page
promotion_names: ["promo name 1", "promo name 2"], // Name(s) of promotion(s) on page
promotion_positions: ["top slot1", "middle slot"], // Name(s) of positions on the page
};
// Add these data points to the 'utag_data' object on the page
// Each array needs to be equal in length
var utag_data = {
page_type: "product_detail",
product_prices: ["369.00"], // price of product on page )
product_names: ["10-NAVY"], // name of product on page
product_categories: ["Jackets & Coats"], // categor(ies) of product on page
product_codes: ["120860-10-NAVY"], // code of product on page
product_colours : ["NAVY"], // colour of product on page
products_in_category : "100", // how many products are there in this category?
};
// note: you'll notice that most of these values are already available in the utag_data object, this is just to add them again in this naming convention for consistency (the original implementation was a little off)
utag.link({
event_type: "Homepage Banners",
event_name: "gender", // where gender is 'Men' or 'Women'
event_label: "title", // name of Hero
event:"promo_click"
promotion_ids: ["promo1"], // ID of promotion being clicked
promotion_names: ["promo name 1"], // Name of promotion being clicked
promotion_creatives: ["creative1"], // Names of creative being clicked
promotion_positions: ["top slot1"], // Name of position being clicked
});
/*
#############################
### CAMPAIGN CODE GRABBER ###
#############################
Author : roshan@tealium.com
Notes:
This extension:
- Pulls the external campaign code from query-string "intcid="
- Pulls the internal campaign code from query-string "cid="
*/
// FUNCTION : Query-string grabber
function getParameterByName(name) {
if (typeof queryString === "undefined") {
queryString = document.location.search;
}
var start_char = queryString.toLowerCase().indexOf("?" + name.toLowerCase() + '=') + 1;
if (start_char === 0) {
start_char = queryString.toLowerCase().indexOf("&" + name.toLowerCase() + '=') + 1;
}
var parameter_length = name.length + 1;
if (start_char !== 0) {
var querystring_value = queryString.substring(start_char + parameter_length).split('&')[0];
}
if (querystring_value) {
return querystring_value
} else {
return "";
}
}
b.query_string_intcid = getParameterByName('intcid');
b.query_string_cid = getParameterByName('cid');