APPI Compliance

<style><!--
#form-appi-edit-account-request,
#form-appi-data-account-request,
#form-appi-personal-data-report-request,
#form-appi-delete-account-request ,
#form-appi-do-not-sell-request {
display: none;
}
#appi_page button {
background-color: transparent;
border: 0;
border-bottom: 1px solid black;
padding: 0px;
}

/* Modal background */
#data-verification-background {
display: none;
position: fixed;
z-index: 1;
padding-top: calc(50vh - 83px);
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0,0.4);
opacity: unset;
z-index: 9999;
}
/* Modal Content */
#data-verification-modal {
background-color: #fefefe;
margin: auto;
padding: 16px;
border: 1px solid #888;
width: 38%;
}
/* Modal Close Button */
.data-verification-close {
color: #aaaaaa;
float: right;
font-size: 28px;
font-weight: bold;
line-height: 17px;
}
.data-verification-close:hover,
.data-verification-close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
/* Checkbox Text */
#data-verification-container p{
display: inline-block;
padding: 0;
margin: 0;
line-height: 24px;
padding-left: 10px;
vertical-align: top;
width: calc(100% - 45px);
}
#data-verification-container a, #data-verification-container a:hover{
text-decoration: underline!important;
color: #4285f4;
}
/* Checkbox Icon */
#data-verification-icon {
cursor: pointer;
position: relative;
margin: auto;
width: 18px;
height: 18px;
-webkit-tap-highlight-color: transparent;
transform: translate3d(0, 0, 0);
margin-top: 2px;
}
#data-verification-icon:before {
content: "";
position: absolute;
top: -7px;
left: -7px;
width: 32px;
height: 32px;
border-radius: 50%;
background: rgba(34,50,84,0.03);
opacity: 0;
transition: opacity 0.2s ease;
}
#data-verification-icon svg {
position: relative;
z-index: 1;
fill: none;
stroke-linecap: round;
stroke-linejoin: round;
stroke: #c8ccd4;
stroke-width: 1.5;
transform: translate3d(0, 0, 0);
transition: all 0.2s ease;
}
#data-verification-icon svg path {
stroke-dasharray: 60;
stroke-dashoffset: 0;
}
#data-verification-icon svg polyline {
stroke-dasharray: 22;
stroke-dashoffset: 66;
}
#data-verification-icon:hover:before {
opacity: 1;
}
#data-verification-container:hover #data-verification-icon svg {
stroke: #4285f4;
}
#data-verification-icon.clicked svg {
stroke: #4285f4;
}
#data-verification-icon.clicked svg path {
stroke-dashoffset: 60;
transition: all 0.3s linear;
}
#data-verification-icon.clicked svg polyline {
stroke-dashoffset: 42;
transition: all 0.2s linear;
transition-delay: 0.15s;
}
#appi_page .list-unstyled li button {
cursor: pointer;
}
.show-isense {
transition: opacity 400ms !important;
}
.hide-isense {
opacity: 0 !important;
transition: 0.4s ease-out;
}

/* Modal changes on mobile resolution*/
@media only screen and (max-width: 600px) {
#data-verification-modal {
width: 90%;
}
}

/* Loading Element */
.loading {
display: none;
top:50vh;
left:50vw;
position:fixed;
}
.loading:not(:required):after {
content: '';
display: block;
font-size: 10px;
width: 1em;
height: 1em;
margin-top: -0.5em;
-webkit-animation: spinner 1500ms infinite linear;
-moz-animation: spinner 1500ms infinite linear;
-ms-animation: spinner 1500ms infinite linear;
-o-animation: spinner 1500ms infinite linear;
animation: spinner 1500ms infinite linear;
border-radius: 0.5em;
-webkit-box-shadow: rgba(255,255,255, 1) 1.5em 0 0 0, rgba(255,255,255, 1) 1.1em 1.1em 0 0, rgba(255,255,255, 1) 0 1.5em 0 0, rgba(255,255,255, 1) -1.1em 1.1em 0 0, rgba(255,255,255, 1) -1.5em 0 0 0, rgba(255,255,255, 1) -1.1em -1.1em 0 0, rgba(255,255,255, 1) 0 -1.5em 0 0, rgba(255,255,255, 1) 1.1em -1.1em 0 0;
box-shadow: rgba(255,255,255, 1) 1.5em 0 0 0, rgba(255,255,255, 1) 1.1em 1.1em 0 0, rgba(255,255,255, 1) 0 1.5em 0 0, rgba(255,255,255, 1) -1.1em 1.1em 0 0, rgba(255,255,255, 1) -1.5em 0 0 0, rgba(255,255,255, 1) -1.1em -1.1em 0 0, rgba(255,255,255, 1) 0 -1.5em 0 0, rgba(255,255,255, 1) 1.1em -1.1em 0 0;
}

/* Animation */
@-webkit-keyframes spinner {
0% {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-moz-keyframes spinner {
0% {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-o-keyframes spinner {
0% {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes spinner {
0% {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
--></style>
<div id="appi_page" class="col-sm-12">
<div class="text-center">The app used for assuring the GDPR/CCPA/APPI/PIPEDA compliance of this site, collects your IP and the email address in order to process the data. For more check <a href="https://gdprcdn.b-cdn.net/pages/privacy_policy" target="_blank" rel="noopener noreferrer"> Privacy Policy &amp; Terms of Service</a><a> </a></div>
<h2>Data Rectification</h2>
<p>You can use the link below to update your account data if it is not accurate.</p>
<ul class="list-unstyled">
<li><button id="btn-appi-edit-account-request" aria-label="edit your account information" aria-controls="form-appi-edit-account-request" aria-expanded="false">Edit your account information</button></li>
</ul>
<div id="form-appi-edit-account-request"><form><label for="form-appi-edit-account-request-email">Enter your email to confirm your identity</label> <input type="email" name="email" id="form-appi-edit-account-request-email" placeholder="example@email.com" autocomplete="email" autocorrect="off" autocapitalize="off" autofocus="" /> <input type="submit" class="btn" id="form-appi-edit-account-request-submit" value="Submit" /></form></div>
<h2>Data Portability</h2>
<p>You can use the links below to download all the data we store and use for a better experience in our store.</p>
<ul class="list-unstyled">
<li><button id="btn-appi-requests-request" aria-label="appi requests" aria-controls="form-appi-data-account-request" aria-expanded="false">APPI requests</button></li>
<li><button id="btn-appi-personal-information-request" aria-label="personal information" aria-controls="form-appi-data-account-request" aria-expanded="false">Personal information</button></li>
<li><button id="btn-appi-orders-request" aria-label="orders" aria-controls="form-appi-data-account-request" aria-expanded="false">Orders</button></li>
</ul>
<div id="form-appi-data-account-request"><form><label for="form-appi-data-account-request-email">Enter your email to confirm your identity</label> <input type="email" name="email" id="form-appi-data-account-request-email" placeholder="example@email.com" autocomplete="email" autocorrect="off" autocapitalize="off" autofocus="" /> <input type="submit" class="btn" id="form-appi-data-account-request-submit" value="Submit" /> <input type="hidden" name="request_type" id="form-appi-data-account-request-request-type" value="" /></form></div>
<h2>Access to Personal Data</h2>
<p>You can use the link below to request a report which will contain all personal information that we store for you.</p>
<ul class="list-unstyled">
<li><button id="btn-appi-personal-data-report-request" aria-label="request a report" aria-controls="form-appi-personal-data-report-request" aria-expanded="false">Request a report</button></li>
</ul>
<div id="form-appi-personal-data-report-request"><form><label for="form-appi-personal-data-report-request-email">Enter your email to confirm your identity</label> <input type="email" name="email" id="form-appi-personal-data-report-request-email" placeholder="example@email.com" autocomplete="email" autocorrect="off" autocapitalize="off" autofocus="" /> <input type="submit" class="btn" id="form-appi-personal-data-report-request-submit" value="Submit" /></form></div>
<div id="do-not-sell">
<h2 style="margin-top: 55px;">Do not Sell My Personal Information to Third Party</h2>
<p>You can submit a request to let us know that you do not agree for your personal information to be collected or sold to a third party.</p>
<ul class="list-unstyled">
<li><button id="btn-appi-do-not-sell-request" aria-label="request a report" aria-controls="form-appi-personal-data-report-request" aria-expanded="false">Do not sell my personal information</button></li>
</ul>
<div id="form-appi-do-not-sell-request"><form><label for="form-appi-do-not-sell-request">Enter your email to confirm your identity</label> <input type="email" name="email" id="form-appi-do-not-sell-request-email" placeholder="example@email.com" autocomplete="email" autocorrect="off" autocapitalize="off" autofocus="" /> <input type="submit" class="btn" id="form-appi-do-not-sell-request-submit" value="Submit" /></form></div>
</div>
<h2>Right to be Forgotten</h2>
<p>Use this option if you want to remove your personal and other data from our store. Keep in mind that <strong>this process will delete your account, so you will no longer be able to access or use it anymore</strong>.</p>
<ul class="list-unstyled">
<li><button id="btn-appi-delete-account-request" aria-label="request personal data deletion" aria-controls="form-appi-delete-account-request" aria-expanded="false">Request personal data deletion</button></li>
</ul>
<div id="form-appi-delete-account-request"><form><label for="form-appi-delete-account-request-email">Enter your email to confirm your identity</label> <input type="email" name="email" id="form-appi-delete-account-request-email" placeholder="example@email.com" autocomplete="email" autocorrect="off" autocapitalize="off" autofocus="" /> <input type="submit" class="btn" id="form-appi-delete-account-request-submit" value="Submit" /></form></div>
</div>
<script>// <![CDATA[
/* SLIDE UP */
let slideUp = (target, duration=500) => {
target.style.transitionProperty = 'height, margin, padding';
target.style.transitionDuration = duration + 'ms';
target.style.boxSizing = 'border-box';
target.style.height = target.offsetHeight + 'px';
target.offsetHeight;
target.style.overflow = 'hidden';
target.style.height = 0;
target.style.paddingTop = 0;
target.style.paddingBottom = 0;
target.style.marginTop = 0;
target.style.marginBottom = 0;
window.setTimeout( () => {
target.style.display = 'none';
target.style.removeProperty('height');
target.style.removeProperty('padding-top');
target.style.removeProperty('padding-bottom');
target.style.removeProperty('margin-top');
target.style.removeProperty('margin-bottom');
target.style.removeProperty('overflow');
target.style.removeProperty('transition-duration');
target.style.removeProperty('transition-property');
}, duration);
}

/* SLIDE DOWN */
let slideDown = (target, duration=500) => {
setTimeout(function(){
target.style.removeProperty('display');
let display = window.getComputedStyle(target).display;
if (display === 'none') display = 'block';

target.style.display = display;

let height = target.offsetHeight;

target.style.overflow = 'hidden';
target.style.height = 0;
target.style.paddingTop = 0;
target.style.paddingBottom = 0;
target.style.marginTop = 0;
target.style.marginBottom = 0;
target.offsetHeight;
target.style.boxSizing = 'border-box';
target.style.transitionProperty = "height, margin, padding";
target.style.transitionDuration = duration + 'ms';
target.style.height = height + 'px';

target.style.removeProperty('padding-top');
target.style.removeProperty('padding-bottom');
target.style.removeProperty('margin-top');
target.style.removeProperty('margin-bottom');

window.setTimeout( () => {
target.style.removeProperty('height');
target.style.removeProperty('overflow');
target.style.removeProperty('transition-duration');
target.style.removeProperty('transition-property');
}, duration);
}, 100)
}

/* TOOGLE */
var slideToggle = (target, duration = 500) => {
if (window.getComputedStyle(target).display === 'none') {
return slideDown(target, duration);
} else {
return slideUp(target, duration);
}
}

/* FADE */
var toggleFadeiSense = (elem, show) => {
if (show) {
elem.style.display = "block";
setTimeout(function(){
elem.classList.add('show-isense');
elem.classList.remove('hide-isense');
},20)
} else {
elem.classList.remove('show-isense');
elem.classList.add('hide-isense');
setTimeout(() => {
elem.style.display = 'none';
}, 400)
}
}

var appiSlideUpAll = function() {
slideUp(document.querySelector('#form-appi-edit-account-request'), 100);
slideUp(document.querySelector('#form-appi-data-account-request'), 100);
slideUp(document.querySelector('#form-appi-personal-data-report-request'), 100);
slideUp(document.querySelector('#form-appi-do-not-sell-request'), 100);
slideUp(document.querySelector('#form-appi-delete-account-request'), 100);
document.querySelector('#appi_page button').setAttribute("aria-expanded", "false");
};

var email, type, consentGiven = false;
var verificationModalContent = '<div id="data-verification-background"><div class="loading"></div><div id="data-verification-modal"><span class="data-verification-close">&times;</span><div id="data-verification-container"><input type="checkbox" style="display: none;"><label id="data-verification-icon"><svg width="18px" height="18px" viewBox="0 0 18 18"><path d="M1,9 L1,3.5 C1,2 2,1 3.5,1 L14.5,1 C16,1 17,2 17,3.5 L17,14.5 C17,16 16,17 14.5,17 L3.5,17 C2,17 1,16 1,14.5 L1,9 Z"></path></path><polyline points="1 9 7 14 15 4"></polyline></svg></label><p id="appi-modal-container-text">I give my consent on collecting my email and IP address for the purpose of processing this request. For more check <a href="https://gdprcdn.b-cdn.net/pages/privacy_policy" target="_blank">Privacy Policy &amp Terms of Service</a>.</p></div></div></div>';

var appiSendRequest = function(callback) {

fetch('https://www.cloudflare.com/cdn-cgi/trace', {
method: 'GET' ,
headers: {
'Content-Type': 'text/plain',
},
})
.then(resp => resp.text())
.then(resp => {
if (!resp.error) {
let ipInfo = resp;

let formData = new FormData();

if (type === 'customer/do-not-sell') {
isenseGDPR.Cookies.set('cookieconsent_preferences_disabled', 'analytics,marketing,functionality,', { expires: 365 });
isenseGDPR.Cookies.set('cookieconsent_status', 'accept_selected', { expires: 365 });

window.Shopify.trackingConsent.setTrackingConsent(false,function() { console.log('setTrackingConsent false')});

if (document.querySelector('.cc-window')) {
document.querySelector('.cc-window').style.display = 'none';
}

// reset popup text
document.querySelector('#appi-modal-container-text').innerHTML = 'I give my consent on collecting my email and IP address for the purpose of processing this request. For more check <a href="https://gdprcdn.b-cdn.net/pages/privacy_policy" target="_blank">Privacy Policy &amp Terms of Service</a>.';
}

formData.append('shop', Shopify.shop);
formData.append('email', email);
formData.append('type', type);
formData.append('sourceOfRequest', 3);
formData.append('ipAddress', ipInfo);
formData.append('consentGiven', consentGiven);
formData.append('page', 'appi');
formData.append('lang', Shopify.locale ? Shopify.locale : '');
formData.append('gtranslateLang', isenseGDPR.Cookies.get('googtrans') ? isenseGDPR.Cookies.get('googtrans') : '');

fetch('https://gdpr.apps.isenselabs.com/gdprRequests/submitRequest', {
method: 'POST',
body: formData
})
.then(resp => resp.json())
.then(resp => {
if (!resp.error) {
appiSlideUpAll();

if (resp.message.length) {
alert(resp.message);
} else {
alert('Your request has been submitted successfully. Please check your email for more information.');
}
} else {
alert(resp.message);
}
if (typeof callback == 'function') {
callback(resp);
}
})
.catch(error => {
alert(error.message);
})

}
else {
alert(resp.message);
}
})
}

//Append modal to body, because otherwise it will not stay centered(even if position is fixed)
document.querySelector("body").insertAdjacentHTML( 'beforeend', verificationModalContent);

document.addEventListener("DOMContentLoaded", function() {
let searchParams = new URLSearchParams(window.location.search);
let param = searchParams.get('id');
if(param) {
document.getElementById(param).scrollIntoView();
}
// When the user clicks on <span> (x), close the modal
document.querySelector('.data-verification-close').addEventListener('click', function(e) {
e.preventDefault();
closeVerificationModal();
});

document.querySelector('#data-verification-icon, #data-verification-container p').addEventListener('click', function(e) {
e.preventDefault();

// Detect a href's click, because it is overwritten.
if(e.target.tagName === "A") {
window.open(e.target.href, '_blank');
return;
}

document.querySelector('#data-verification-icon').classList.add("clicked");
setTimeout(()=>{
toggleFadeiSense(document.querySelector("#data-verification-modal"), false);
document.querySelector('#data-verification-background .loading').style.display = 'inline-block';
consentGiven = true;
appiSendRequest(function(resp) {
consentGiven = false;
closeVerificationModal();
});
}, 400);
});
});

function openVerificationModal(){
toggleFadeiSense(document.querySelector("#data-verification-modal"), true);
toggleFadeiSense(document.querySelector('#data-verification-background'), true);
}

function closeVerificationModal(){
toggleFadeiSense(document.querySelector("#data-verification-background"), false);

document.querySelector('#data-verification-icon').classList.remove("clicked");
document.querySelector('#data-verification-background .loading').style.display = 'none';
}

document.querySelector('#btn-appi-edit-account-request').addEventListener('click', function(e) {
e.preventDefault();
appiSlideUpAll();
slideDown(document.querySelector('#form-appi-edit-account-request'), 200);
this.setAttribute("aria-expanded", "true");
});

document.querySelector('#form-appi-edit-account-request-submit').addEventListener('click', function(e) {
e.preventDefault();
email = document.querySelector('#form-appi-edit-account-request-email').value;
type = 'customer/edit';
openVerificationModal();
});

document.querySelectorAll('#btn-appi-requests-request, #btn-appi-personal-information-request, #btn-appi-orders-request').forEach(element => {

element.addEventListener('click', function(e) {
e.preventDefault();
appiSlideUpAll();

type = '';

// Reset the popup message
document.querySelector('#appi-modal-container-text').innerHTML = 'I give my consent on collecting my email and IP address for the purpose of processing this request. For more check <a href="https://gdprcdn.b-cdn.net/pages/privacy_policy" target="_blank">Privacy Policy &amp Terms of Service</a>.';

switch(this.getAttribute('id')) {
case 'btn-appi-requests-request':
type = 'customer/requests';
break;
case 'btn-appi-personal-information-request':
type = 'customer/personal_info';
break;
case 'btn-appi-orders-request':
type = 'customer/orders';
break;
}

document.querySelector('#form-appi-data-account-request-request-type').value = type;

slideDown(document.querySelector('#form-appi-data-account-request'), 200);
this.setAttribute("aria-expanded", "true");
})
});

document.querySelector('#form-appi-data-account-request-submit').addEventListener('click', function(e) {
e.preventDefault();
email = document.querySelector('#form-appi-data-account-request-email').value;
type = document.querySelector('#form-appi-data-account-request-request-type').value;
openVerificationModal();
});

document.querySelector('#btn-appi-personal-data-report-request').addEventListener('click', function(e) {
e.preventDefault();
appiSlideUpAll();
slideDown(document.querySelector('#form-appi-personal-data-report-request'), 200);
this.setAttribute("aria-expanded", "true");
});

document.querySelector('#form-appi-personal-data-report-request-submit').addEventListener('click', function(e) {
e.preventDefault();
email = document.querySelector('#form-appi-personal-data-report-request-email').value;
type = 'customer/report';
openVerificationModal();
});

document.querySelector('#btn-appi-do-not-sell-request').addEventListener('click', function(e) {
e.preventDefault();
appiSlideUpAll();
slideDown(document.querySelector('#form-appi-do-not-sell-request'), 200);
this.setAttribute("aria-expanded", "true");
});

document.querySelector('#form-appi-do-not-sell-request-submit').addEventListener('click', function(e) {
e.preventDefault();
email = document.querySelector('#form-appi-do-not-sell-request-email').value;
type = 'customer/do-not-sell';

// Check if customer is logged in
if (__st.cid != undefined) {
document.querySelector('#appi-modal-container-text').innerHTML = 'I give my consent on collecting my email and IP address for the purpose of processing this request. For more check <a href="https://gdprcdn.b-cdn.net/pages/privacy_policy" target="_blank">Privacy Policy &amp Terms of Service</a>.';
} else {
document.querySelector('#appi-modal-container-text').innerHTML = 'I give my consent on collecting my email and IP address for the purpose of processing this request. For more check <a href="https://gdprcdn.b-cdn.net/pages/privacy_policy" target="_blank">Privacy Policy &amp Terms of Service</a>.</br> <b>Note:</b> If you are a guest user or you are not logged into your account, your opt-out choice will only be effective for this browser session.';
}

openVerificationModal();
});

document.querySelector('#btn-appi-delete-account-request').addEventListener('click', function(e) {
e.preventDefault();
appiSlideUpAll();
slideDown(document.querySelector('#form-appi-delete-account-request'), 200);
this.setAttribute("aria-expanded", "true");
});

document.querySelector('#form-appi-delete-account-request-submit').addEventListener('click', function(e) {
e.preventDefault();
email = document.querySelector('#form-appi-delete-account-request-email').value;
type = 'customer/delete';
openVerificationModal();
});
// ]]></script>