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
(function() { | |
//Bigcommerce doesn't provide variables for individual product info, | |
//so this is a hacky way to read it from the GA ecommerce script | |
var products = []; | |
var scripts = document.getElementsByTagName('script'); | |
for (var i = 0; i < scripts.length; i++) { | |
if (scripts[i].innerHTML.match(/pageTracker\._addItem/)) { | |
var stuff = scripts[i].innerHTML.match(/_addItem\(([^\)]+)/g); | |
for (var c = 0; c < stuff.length; c++) { |