Skip to content

Instantly share code, notes, and snippets.

Sam Nazari samnazari

Block or report user

Report or block samnazari

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@samnazari
samnazari / cartIntegration.js
Created May 30, 2017
Ascend - Shopify - Shopping Cart Integration
View cartIntegration.js
<script type="text/javascript">
function getCookie(name) {
var value = "; " + document.cookie;
var parts = value.split("; " + name + "=");
if (parts.length == 2) return parts.pop().split(";").shift();
}
var ascendCookies = getCookie('_ascend_current');
var ascendInput = document.createElement('input');
ascendInput.type = 'hidden';
ascendInput.name = 'attributes[ascend]';
@samnazari
samnazari / checkoutPageCode_Conversions.liquid
Created May 30, 2017
Sentient Ascend - Shopify Integration - Goal: Conversions
View checkoutPageCode_Conversions.liquid
{% if first_time_accessed %}
<script type="text/javascript">
function createCookie(name, value, days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + value + expires + ";";
@samnazari
samnazari / checkoutPageCode_Revenue.liquid
Created May 30, 2017
Sentient Ascend - Shopify Integration - Conversion Goal - Revenu
View checkoutPageCode_Revenue.liquid
{% if first_time_accessed %}
<script type="text/javascript">
function createCookie(name, value, days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + value + expires + ";";
You can’t perform that action at this time.