← All Integrations

Integrate with Shopify

We make it easy for you to integrate with Shopify, while allowing you to fully customize what you track.

Getting Started

  1. Go to the projects page inside of the Stormly application and click Set-Up Data as shown below:



  2. Under "Use tracking code from:" pick "Segment.com", then copy the API key as shown below:



  3. Copy the API Key. You will need it in the next step.

Note: Tracked data becomes available in Stormly within seconds usually, but new projects become "active" only once at least 50 unique users are tracked.

Shopify Code Setup

Login to your Shopify admin panel, then click Online Store and then Edit Code on the right side of the page under the Actions dropdown, as shown below:

Once you're in the code editor, you'll see two folders: Layout and Templates. Each of the instructions below indicates which folder and which file to edit. Click Save after pasting each snippet.

Tracking Setup

In folder Layouts / file theme.liquid — add the code below above the </head> tag.
Important: Replace YOUR_STORMLY_KEY_HERE with the API KEY from Getting Started.

Copy code

Product Category / Collection Page

In folder Templates / file collection.liquid — add code below to the top of the page. This tracks product category and collection pages.

Copy code

Product Pages

In folder Templates / file product.liquid — add code below to the top of the page. This tracks users viewing a product and adding it to their cart.

Copy code

View Shopping Cart Page

In folder Templates / file cart.liquid — add code below to the top of the page. This tracks users viewing their shopping cart and clicking payment buttons.

Copy code

Landing Page

In folder Templates / file index.liquid — add code below to the top of the page. This tracks users visiting the main landing page.

Copy code

Search Page

In folder Templates / file search.liquid — add code below to the top. This tracks users using the search option.

Copy code

Signup For Account

In folder Templates / file customers/register.liquid — add code below to the top. This tracks product category and product collection pages.

Copy code

Blog Pages

In folder Templates / file blog.liquid — tracks users visiting the blog listing. In article.liquid — tracks users reading blog articles.

Copy blog.liquid code
Copy article.liquid code

Payment Completed Page

This tracks user payment completion. Login to your Shopify admin panel, click Settings at the bottom, then click the Checkout link:

Scroll down to the Additional Scripts section and paste the code below. If there is existing code, paste above it.
Important: Replace YOUR_STORMLY_KEY_HERE with the API KEY from Getting Started.

Copy code

Ready to connect?

Sign up free and start seeing deep ecommerce insights from your Shopify store.