This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i = 0; i < dataLayer.event.length; i++) { | |
if(dataLayer.event[i].eventInfo.eventName == "Checkout"){ | |
s.events += ",scCheckout"; | |
break; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i = 0; i < dataLayer.cart.item.length; i++) { | |
s.products += ",;" + dataLayer.cart.item[i].productInfo.productID; | |
} | |
s.products = s.products.substr(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
if (window.dataLayer.page.attributes.length){ | |
var refinements=""; | |
for (var i = 0; i < window.dataLayer.page.attributes.length; i++) { | |
if (dataLayer.page.attributes[i].attributeInfo){ | |
refinements += dataLayer.page.attributes[i].attributeInfo.refinementValue + ";"; | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import the urlprase library to break url into components | |
from urlparse import urlparse | |
#import pandas for data processing | |
from pandas import DataFrame, Series | |
import pandas as pd | |
#import URL data | |
df = pd.read_csv("/Users/Documents/analysis/my_urls.csv") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We will use data structures and data analysis tools provided in Pandas library | |
import pandas as pd | |
# Import retail sales data from an Excel Workbook into a data frame | |
path = '/Documents/analysis/python/examples/2015sales.xlsx' | |
xlsx = pd.ExcelFile(path) | |
df = pd.read_excel(xlsx, 'Sheet1') | |
# Let's add a new boolean column to our dataframe that will identify a duplicated order line item (False=Not a duplicate; True=Duplicate) | |
df['is_duplicated'] = df.duplicated(['order_id', 'order_item_id']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(_satellite.getVar('Order Value')){ | |
var orderValue; | |
var img = new Image(); | |
orderValue = _satellite.getVar('Order Value'); | |
img.src = "https://marketingpixel.example.org/track/conv/?adid=2dngvjx&order_value=" + orderValue ; | |
document.body.appendChild(img); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ACTION REQUIRED: TAG CONFIGURATION | |
var killDate = new Date("MM/DD/YYYY"); //INPUT CAMPAIGN END DATE | |
var vendorName = ""; //INPUT NAME OF MARKETING VENDOR | |
var requestNum = ""; //INPUT TRACKING REQUEST NUMBER | |
var tagName = ""; //INPUT NAME OF TAG/PIXEL | |
//Get current date and remove hours | |
var todaysDate = new Date(); | |
todaysDate.setHours(0,0,0,0); |
NewerOlder