-
-
Save mike-seekwell/fe9d626ce33575d6dbea686e67913935 to your computer and use it in GitHub Desktop.
instpageAdStuff
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
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-781982051"></script> | |
<script> | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){dataLayer.push(arguments);} | |
gtag('js', new Date()); | |
gtag('config', 'AW-781982051'); | |
</script> | |
<script> | |
var targetEnv = 'prod' | |
var baseUrlDict = { | |
local: 'https://seekwell.ngrok.io/', | |
dev: 'https://seekwell-dev.appspot.com/', | |
prod: 'https://www.seekwell.io/' | |
} | |
var BASE_URL = baseUrlDict[targetEnv] | |
function logEvent(data, opts) { | |
data.eventType = data.eventType || 999 | |
data.path = window.location.pathname | |
data.url = window.location.href | |
data.referrer = document.referrer | |
$.ajax({ | |
type: "POST", | |
url: BASE_URL + "handle_event", | |
data: JSON.stringify(data), | |
contentType: "application/json; charset=utf-8", | |
dataType: "json", | |
failure: function (errMsg) { | |
console.log(errMsg); | |
} | |
}); | |
} | |
ijQuery(document).ready(function(){ | |
ijQuery('.dynamic-button').on('click', function(e) { | |
console.log(e) | |
var downloadBtn = $(e.currentTarget).first().html().indexOf('DOWNLOAD')>=0 | |
if (downloadBtn) { | |
console.log('clicked download...') | |
var logToFlask = { | |
eventType: 12, | |
eventSubType: 10 | |
} | |
logEvent(logToFlask, {}) | |
gtag('event', 'conversion', {'send_to': 'AW-781982051/wr1fCImisYwBEOOy8PQC'}); | |
} | |
}); | |
}); | |
</script> | |
<script> | |
window['_fs_debug'] = false; | |
window['_fs_host'] = 'fullstory.com'; | |
window['_fs_org'] = '6NWKC'; | |
window['_fs_namespace'] = 'FS'; | |
(function(m,n,e,t,l,o,g,y){ | |
if (e in m) {if(m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].');} return;} | |
g=m[e]=function(a,b){g.q?g.q.push([a,b]):g._api(a,b);};g.q=[]; | |
o=n.createElement(t);o.async=1;o.src='https://'+_fs_host+'/s/fs.js'; | |
y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y); | |
g.identify=function(i,v){g(l,{uid:i});if(v)g(l,v)};g.setUserVars=function(v){g(l,v)}; | |
y="rec";g.shutdown=function(i,v){g(y,!1)};g.restart=function(i,v){g(y,!0)}; | |
g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)}; | |
g.clearUserCookie=function(c,d,i){if(!c || document.cookie.match('fs_uid=[`;`]*`[`;`]*`[`;`]*`')){ | |
d=n.domain;while(1){n.cookie='fs_uid=;domain='+d+ | |
';path=/;expires='+new Date(0).toUTCString();i=d.indexOf('.');if(i<0)break;d=d.slice(i+1)}}}; | |
})(window,document,window['_fs_namespace'],'script','user'); | |
} | |
</script> | |
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); | |
ga('create', 'UA-106122506-1', 'auto'); | |
ga('send', 'pageview'); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment