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
window.VWO = window.VWO || []; | |
VWO.push(['config', { | |
storage: { | |
// enter the full url of the sync script | |
syncUrl: 'https://somewebsite.com/sync.php' | |
} | |
}]); |
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
<!-- VWO One Smartcode (Replace <ACCOUNTID> with your VWO account id) --> | |
< script src = "https://dev.visualwebsiteoptimizer.com/lib/<ACCOUNTID>.js" > < /script> < !--VWO One Smartcode ends --> |
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 src = "https://dev.visualwebsiteoptimizer.com/lib/45.js" > < /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
<!-- VWO One Smartcode (Replace <ACCOUNTID> with your VWO account id) --> | |
< script src = "https://dev.visualwebsiteoptimizer.com/lib/<ACCOUNTID>_nojq.js" > < /script> < !--VWO One Smartcode ends --> |
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 src = "https://dev.visualwebsiteoptimizer.com/lib/45_nojq.js" > < /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
window.VWO = window.VWO || []; | |
window.VWO.push(['activate', { | |
virtualPageUrl: 'NEW_VIRTUAL_PAGE_URL' | |
}]); |
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
app.UseMvc(routes => { | |
routes.MapRoute("cookies", "sync", defaults: new { | |
controller = "Cookies", action = "SyncCookies" | |
}); | |
}); |
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
public IActionResult SyncCookies() { | |
foreach(string cookieName in Request.Cookies.Keys) { | |
string pattern = @ "^(_vis_opt_|_vwo).*"; | |
Regex regex = new Regex(pattern, RegexOptions.IgnoreCase); | |
Match match = regex.Match(cookieName); | |
if (match.Success) { | |
string cookieValue = Request.Cookies[cookieName]; | |
CookieOptions option = new CookieOptions(); | |
UInt64 expiry = 315360000000 UL; | |
// Expire any VWO cookies after 10 years. |
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
using System; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Http; | |
using System.Text.RegularExpressions; | |
namespace YourApplication.Controllers { | |
public class CookiesController: Controller { | |
[HttpGet] | |
public IActionResult SyncCookies() { |
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
window.VWO = window.VWO || []; | |
window.VWO.push(['activate', { | |
customUrl: 'http://mycustomurl.com/custom-url' | |
}]); |
OlderNewer