Archives: Snippets
wrong redirect .htaccess
# Slash al final RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !# RewriteCond %{REQUEST_URI} !(.*)/$ RewriteRule ^(.*)$ https://yourdomain.com/$1/ [L,R=301] # END Slash al finalContinue reading
Untitled Snippet
google-site-verification=zZNaaEK34pc0WzFRzwMX5Xhh1eNMAld4DAZRmUH3klw
Remove Specific Campaign Based on the Referral URL- v1
document.addEventListener(‘om.Campaign.startShow’, function(event) { if(document.referrer.search.indexOf(‘google.com’) > 0) { // replace with the specific referral domain var optinCampaign = document.querySelector(‘#om-CAMPAIGN_ID-holder’); // replace CAMPAIGN_ID with the unique ID for your campaign optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading
Remove Specific Campaign Based on the Referral URL-v1
document.addEventListener(‘om.Campaign.startShow’, function(event) { if(document.referrer.search.indexOf(‘google.com’) > 0) { // replace with the specific referral domain var optinCampaign = document.querySelector(‘#om-CAMPAIGN_ID’); // replace CAMPAIGN_ID with the unique ID for your campaign optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading
Remove Specific Campaign From Any URLs Containing a Specific URL Path-v1
document.addEventListener(‘om.Campaign.startShow’, function(event) { if(window.location.search.indexOf(‘shopping-cart’) > -1) { // replace shopping-cart wtih your specific URL path var optinCampaign = document.querySelector(‘#om-CAMPAIGN_ID-holder’); // replace CAMPAIGN_ID with the unique ID of your campaign optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading
Remove Specific Campaign From a Specific URL-v1
document.addEventListener(‘om.Campaign.startShow’, function(event) { if(window.location.href == ‘https://example.com/specific-page’) { // replace with your specific URL var optinCampaign = document.querySelector(‘#om-CAMPAIGN_ID-holder’); // replace CAMPAIGN_ID with your campaign’s unique ID optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading
Remove All Campaigns From a Specific URL-v1
document.addEventListener(‘om.Campaign.startShow’, function(event) { if(window.location.href == ‘https://example.com/specific-page’) { // replace with your specific URL var optinCampaign = document.querySelector(‘#om-‘ + event.detail.Campaign.id + ‘-holder’); optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading