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
override fun onVWOIntegrationCompleted(integrations: List<Integrations>) { | |
for (integration in integrations) { | |
val url = VWOInsights.getSessionURL(integration) | |
if (url == null) { | |
VWOLog.e( | |
VWOLog.DEBUG_LOGS, | |
"Session URL could not be generated - VWO Insights is not initialized. Please ensure that VWO Insights is properly initialized before attempting to generate the session URL. Refer to the documentation for initialization instructions.", | |
checkLoggable = false, | |
sendToServer = true | |
) |
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
func onVWOIntegrationCompleted(integrations: [IntegrationsList]) { | |
for integration in integrations { | |
let VWOSessionURL = VWO.getSessionURL(source: integration) | |
if(VWOSessionURL == nil){ | |
print("Session URL could not be generated - VWO Insights is not initialized. Please ensure that VWO Insights is properly initialized before attempting to generate the session URL. Refer to the documentation for initialization instructions.") | |
return | |
} | |
switch integration { | |
case IntegrationsList.CRASHLYTICS : | |
let crashlyticsReference = Crashlytics.crashlytics() |
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> | |
(function () { | |
function convertToDefaultCurrency(amount, fromCurrency, precision = 2) { | |
var defaultCurrency = "USD"; | |
var currencyConversion = { | |
"USD": 1, // Always keep the default store currency in the array | |
"EUR": 1.1, // Euro | |
"GBP": 0.82, // Great British Pound | |
"AUD": 1.43, // Australian Dollar |
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 convertToDefaultCurrency(amount, fromCurrency, precision = 2) { | |
// For reference. Change USD to your default store currency | |
var defaultCurrency = "USD"; | |
/** | |
* Your array of currencies and their conversion rates relative to the default currency | |
* Example: If USD is your store currency or the one in which you want to track revenue and | |
* 1 USD = 0.8 GBP then the entry in the array will be "GBP": 0.8 | |
**/ | |
var currencyConversion = { |
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 type="text/javascript"> | |
window._vis_opt_queue = window._vis_opt_queue || []; | |
window._vis_opt_queue.push(function() { | |
_vis_opt_revenue_conversion({order_total}, {allowMultipleConversions: true}); | |
}); | |
</script> |
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 type = "text/javascript" > | |
window._vis_opt_queue = window._vis_opt_queue || []; | |
window._vis_opt_queue.push(function() { | |
_vis_opt_revenue_conversion(%%ORDER_AMOUNT%%, {allowMultipleConversions: true}); | |
}); | |
window.VWO = window.VWO || []; | |
window.VWO.push(['track.revenueConversion', %%ORDER_AMOUNT%%]); | |
</script> |
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
{ | |
"d": { | |
"msgId": "DAD28496D5AE5AC737518D9DD6CC976FE-1684227244179", | |
"visId": "DAD28496D5AE5AC737518D9DD6CC976FE", | |
"event": { | |
"props": { | |
"productCategory": "Electronics", | |
"price": 350, | |
"page": { | |
"title": "Sample Website", |
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
{ | |
"d": { | |
"msgId": "<VWO_UUID>-<TIMESTAMP IN MILLISECONDS>", | |
"visId": "<VWO_UUID>", | |
"event": { | |
"props": { | |
"page": { | |
"title": "Sample Title", | |
"url": "https://www.domain.com", | |
"referredUrl": "" |
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
<!-- Start VWO Async SmartCode --> | |
<link rel="preconnect" href="https://dev.visualwebsiteoptimizer.com" /> | |
<script type='text/javascript' id='vwoCode'> | |
_vis_opt_url = document.location.protocol + '//' + document.location.hostname + | |
document.location.pathname + "?preview_theme_id=XXXXXXX&" + | |
document.location.search.substring(1, ) + document.location.hash; //Replace "XXXXXXX" with your Shopify Preview theme ID | |
window._vwo_code || (function() { | |
var account_id=XXXXX, //Replace XXXXX with your accountID | |
_vis_opt_url = window._vis_opt_url || document.URL, | |
version=2.0, |
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 initYTAPI() { | |
if (typeof(window.YT) == "undefined") { | |
vwo_$.getScript("https://www.youtube.com/iframe_api", function(data, textStatus, jqxhr) { | |
if (window.timerX) clearInterval(window.timerX); | |
window.timerX = setInterval(function() { | |
if (typeof(window.YT.Player) != "undefined") { | |
window.vwo_player = new YT.Player('vwo_YT', { | |
events: { | |
'onStateChange': onPlayerStateChange | |
} |
NewerOlder