Athlete & Creative

Building sustainable businesses.

About

Mark Cafero

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.

Our Portfolio

Brands

Luxury Surf is an end to end luxury yacht toy business, providing sales, service and lessons based in Fort Lauderdale, FL.

New Wave Kiteboarding is a full service kiteboarding center in Stuart, FL.

HydroAcquire is an enhanced CRM built for the marine and real estate industry. Including a knowledgable AI chat bot, automatic payment & booking system and cross platform data management.

Blog

How To Track URL Parameters Through Shopify Form & Email Signup

How To Track URL Parameters Through Shopify Form & Email Signup

March 02, 20252 min read

How To Track URL Parameters Through Shopify Form & Email Signup

Why do we do this?

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. 

Step 1:

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. 

Step 2:

Insert this code into the form underneath the other hidden tags.

<input type="hidden" name="contact[note]" id="page_url">


How To Track URL Parameters Through Shopify Form & Email Signup

Step 3: Add the script to add url from href

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>


Step 4: Test Form Submission

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.


Ex.  hello+1234@markcafero.com



Now go to your Shopify Admin and check the note of the new customer.


You should see the URL in the Note section.



Back to Blog

Get In Touch

Powered by HydroAcquire.