Hi and thanks in advance of any support on this.
I have a site where I'm offering to send US visitors back to our US specific website via a Modal popup qwhen they land on our AU site.
I only want the script to run once per visit.
What would I need to add to below to achieve this?
Thanks (ps- very new to ajax and anything outside HTML / CSS)
$(document).ready(function() {
$.ajax({
url: 'https://api.ipstack.com/check?access_key=##hidden##',
dataType: 'jsonp',
success: function(location) {
// AU -- Australia
if (location.country_code === 'AU') {
} else {
// Reveal Modal to select AU or US store
// Modal 1
$('#popup-2').slickModals({
popupType: 'delayed',
delayTime: 0,
overlayColor: 'rgba(0, 0, 0, 0.1)',
popupWidth: '420px',
popupHeight: 'auto',
popupLocation: 'topCenter',
popupAnimationDuration: '0.4',
popupAnimationEffect: 'slideTop',
popupMargin: '30px',
popupPadding: '20px',
mobileBreakPoint: '420px',
mobileLocation: 'topCenter',
mobileWidth: '100%',
mobileHeight: 'auto',
mobilePadding: '0px',
reopenClass: 'openSlickModal-2'
})
}
}
});
});