Building sustainable businesses.
Mark Cafero has been in the water sports industry for over 7 years. After being born in New York and growing up in Turks and Caicos, Mark was introduced to water sports and creativity at a young age. At the age of 16, Mark began competing in kiteboarding and progressed into a design and development role at a kiteboarding manufacturer.
Shopify stores most of the visit data for customers under the Order object. This makes it difficult to access when a customer is still just a “lead.” We need to pass the URL which contains necessary parameters such as the GCLID (Google Click ID) when a customer signs up to the email newsletter.
We will pass the entire URL to the Note of the Shopify Customer as the form submits and creates the customer. We can then pass this data to any of our other solutions, allowing us to attribute revenue correctly.
Edit the code of your Shopify theme. Make a copy as a backup or edit the copy to not affect your live store.
Navigate to the form where your newsletter signups occur. In this example, we are editing the Impulse version 7.6.1 theme which has a snippet called newsletter-form. This code should work across most themes, we are simply adding a hidden field to the form, allowing us to pass the data to shopify with the form submission.
For Impact Theme 6.6.0, you’ll be editing newsletter-popup.liquid in the snippets folder.
Tip: You can look at your theme in the “Customize” view to see what your snippet or section is called for the email signup.
Insert this code into the form underneath the other hidden tags.
<input type="hidden" name="contact[note]" id="page_url">
Underneath the form, paste this script code to pass the href value to the note inside the input.
<script>
document.getElementById("page_url").value = window.location.href;
</script>
Go to your website and sign up for the email with a test ?ref=testing parameter
For ex. https://markcafero.com?ref=testing
Use a new email so you can simulate a new customer.
Pro tip: Use + inside of your email to simulate a new email using your existing inbox.
Now go to your Shopify Admin and check the note of the new customer.
You should see the URL in the Note section.
Powered by HydroAcquire.