Skip to content

Instantly share code, notes, and snippets.

View configureHeatmapClick.js
<script type='text/javascript'>
var _vwo_click = 10; // this will track first 10 clicks
</script>
View usingJqueryForAsyncCode.js
<script type='text/javascript'>
use_existing_jquery=false,
</script>
View usingJqueryForSyncCode.js
<!-- VWO One Smartcode (Replace <ACCOUNTID> with your VWO account id) -->
<script src = "https://dev.visualwebsiteoptimizer.com/lib/<ACCOUNTID>_nojq.js"> </script>
View settingDomain.js
<script type='text/javascript'>
var _vis_opt_domain = 'yourdomain.com',
</script>
View hidingAnElement.js
<script type = 'text/javascript' >
hide_element = '',
</script>
View configureTimeInterval.js
<script type = 'text/javascript' >
settings_tolerance = 2000,
library_tolerance = 2500,
</script>
View modifyCookieDuration.js
<script type = 'text/javascript' >
_vis_opt_cookieDays = 1,
</script>
View customUrlSetup.js
//Replace NEW_VIRTUAL_PAGE_URL with your customized URL)
window.VWO = window.VWO || [];
window.VWO.push(['activate', {
virtualPageUrl: 'NEW_VIRTUAL_PAGE_URL'
}]);
@vwo-kb
vwo-kb / nonGTM.js
Created Oct 22, 2019
How to Integrate VWO with UA through a non-GTM Tag Manager
View nonGTM.js
ga.getAll().forEach(function(e) {
if (e.get('trackingId') == 'UA-9679904-1') {
console.log(window.finalprefix = e.get('name'));
};
});
@vwo-kb
vwo-kb / vwoClearbitIntegration.js
Last active Apr 10, 2020
JS variable for the Clearbit-VWO integration
View vwoClearbitIntegration.js
(function() {
if (!window.ClearBitAdded) {
window.ClearBitAdded = true;
var script = document.createElement('script');
script.src = "https://reveal.clearbit.com/v1/companies/reveal?authorization=paste_your_clearbit_key_here&variable=reveal_organization";
var event = new CustomEvent("ClearBitAdded", {
"detail": "ClearBitAdded"
});
script.onerror = function() {
console.log('VWO: Error Ocuured while fetching the clearbit data');