Creating UTM links in Shopify lets you track exactly which ads, emails, or social posts drive traffic and sales to your store. A UTM link is a standard web URL with added parameters—utm_source, utm_medium, utm_campaign, and optionally utm_term or utm_content—that tell Google Analytics (or another reporting tool) where a visitor came from. For example, a link to your summer collection with utm_source=facebook and utm_medium=cpc shows that a click came from a Facebook ad. Without these parameters, all traffic from Facebook appears as one undifferentiated source, making it impossible to measure which specific campaign or creative performed best. Shopify merchants use UTM links for email newsletters, influencer collaborations, paid ads, and affiliate promotions to attribute revenue accurately and optimize spend.

Manually adding UTM parameters to a Shopify URL can be error-prone, especially when the link already contains other query strings like ref codes or language settings. A browser-based UTM Link Builder simplifies this process by letting you paste your complete Shopify URL, enter campaign details, and generate a clean link without editing the query string by hand. The tool preserves all existing parameters except the five traditional UTM keys, which it replaces with your new values. This ensures that tracking codes like gclid (for Google Ads) or ref (for referral programs) remain intact while your campaign labels are updated. The entire process happens in your browser, so your destination URL and campaign details are never sent to a server, keeping your data private.

how to create utm links in shopify
Create UTM Links in Shopify for Accurate Campaign Tracking

UTM links are essential for Shopify stores because they connect marketing efforts to actual sales. When a customer clicks a UTM-tagged link and completes a purchase, Shopify’s native reporting and Google Analytics can attribute that sale to the specific campaign, source, and medium. For example, if you run a Black Friday sale and promote it via email, Facebook ads, and Instagram influencers, UTM links let you see which channel generated the most revenue. Without them, all traffic from these sources appears as "direct" or "referral," making it impossible to measure ROI or optimize future campaigns. UTM links also help you track the performance of individual creatives, such as different ad images or email subject lines, by using unique utm_content values for each variation.

Shopify’s built-in analytics provide some traffic insights, but they lack the granularity of UTM tracking. For instance, Shopify might show that 500 visitors came from Facebook, but it won’t tell you whether those visitors clicked a paid ad, an organic post, or an influencer’s story. UTM links fill this gap by encoding the exact source and medium in the URL. They also work seamlessly with Shopify’s discount codes and customer tags, allowing you to combine tracking with promotions. For example, you can create a UTM link for a Facebook ad that includes a discount code, then use Shopify’s reports to see how many sales that specific ad generated. This level of detail is critical for scaling your marketing efforts and allocating budget to the highest-performing channels.

To create a UTM link for your Shopify store, follow these steps using a browser-based UTM Link Builder. This method ensures your link is correctly formatted and preserves any existing query parameters.

  1. Copy your Shopify URL: Open your Shopify store and navigate to the product, collection, or page you want to promote. Copy the full URL from your browser’s address bar, including any query parameters (e.g., https://yourstore.com/products/summer-dress?ref=homepage).
  2. Open the UTM Link Builder: Go to the UTM Link Builder tool in your browser. The tool runs entirely locally, so no data is sent to a server.
  3. Paste your Shopify URL: In the tool’s input field, paste the complete URL you copied. The tool will automatically detect and preserve any existing query parameters (like ref=homepage) and the URL path.
  4. Enter campaign details: Fill in the required fields:
    • Campaign Source: The platform where the link will be shared (e.g., facebook, email, instagram).
    • Campaign Medium: The type of marketing channel (e.g., cpc for paid ads, email, social).
    • Campaign Name: A descriptive name for the campaign (e.g., black-friday-2026, summer-sale).
  5. Add optional parameters (if needed): Use utm_term to track specific keywords (e.g., for paid search ads) or utm_content to differentiate between ad creatives (e.g., banner-ad vs. video-ad). Leave these fields blank if they’re not relevant to your campaign.
  6. Generate the UTM link: Click the "Build URL" button. The tool will display your new UTM link, with the original path, fragment, and unrelated query parameters preserved. For example, if your original URL was https://yourstore.com/products/summer-dress?ref=homepage, the generated link might look like https://yourstore.com/products/summer-dress?ref=homepage&utm_source=facebook&utm_medium=cpc&utm_campaign=summer-sale.
  7. Review and copy the link: Check the generated URL to ensure all parameters are correct. Click the "Copy" button to save the link to your clipboard. You can now use this link in your ads, emails, or social posts.
  8. Test the link: Before publishing, open the UTM link in a private browsing window to confirm it loads the correct Shopify page. Then, check your Google Analytics or Shopify reports to verify that the traffic is being attributed to the correct campaign.

Common UTM Parameters for Shopify Campaigns

The five traditional UTM parameters help you categorize and analyze your Shopify traffic. Below is a table of common values for each parameter, along with examples of how they’re used in Shopify marketing.

Parameter Purpose Common Values for Shopify Example Use Case
utm_source Identifies the platform or website sending traffic. facebook, google, email, instagram, tiktok, pinterest, newsletter A Facebook ad promoting a new product line.
utm_medium Describes the type of marketing channel. cpc (paid ads), email, social, affiliate, banner, referral An email campaign sent to your subscriber list.
utm_campaign Names the specific campaign or promotion. black-friday-2026, summer-sale, launch-week, abandoned-cart, influencer-collab A Black Friday sale across multiple channels.
utm_term (optional) Tracks keywords for paid search ads or specific search terms. summer+dresses, discount+code, free+shipping A Google Ads campaign targeting the keyword "summer dresses."
utm_content (optional) Differentiates between multiple links in the same campaign (e.g., ad creatives or email CTAs). banner-ad, video-ad, cta-button, sidebar-link Two different Facebook ad creatives for the same campaign.

To get the most out of UTM links for your Shopify store, follow these best practices to ensure accurate tracking and reporting.

Use consistent naming conventions: Decide on a naming format for your UTM parameters and stick to it across all campaigns. For example, use lowercase letters and hyphens (e.g., utm_source=facebook, utm_campaign=black-friday-2026) instead of mixing cases or spaces. Inconsistent naming (e.g., Facebook vs. facebook) creates separate entries in Google Analytics, making it harder to aggregate data. If you work with a team, document your naming rules in a shared guide to ensure everyone uses the same format.

Preserve existing query parameters: Shopify URLs often include query parameters like ref (for referral tracking), gclid (for Google Ads), or variant (for product variants). When creating UTM links, use a tool that retains these parameters while updating only the UTM tags. This ensures that other tracking systems (like Google Ads or affiliate programs) continue to work correctly. For example, if your original URL is https://yourstore.com/products/hoodie?variant=123456789&ref=affiliate123, the UTM Link Builder will preserve variant and ref while adding your campaign parameters.

Avoid personal information in UTM values: Never include names, email addresses, phone numbers, or other personal data in UTM parameters. Query strings can appear in browser history, referral logs, and analytics reports, which may expose sensitive information. Instead, use generic labels that describe the marketing placement. For example, use utm_source=influencer&utm_content=jane-doe-collab instead of [email protected].

Test UTM links before publishing: Always test your UTM links in a private browsing window to ensure they load the correct Shopify page. After publishing, check your Google Analytics or Shopify reports to confirm that traffic is being attributed to the right campaign. If you notice discrepancies, verify that the UTM parameters are correctly formatted and that no redirects are stripping them from the URL.

Use UTM links with Shopify discount codes: Combine UTM links with Shopify’s discount codes to track the effectiveness of promotions. For example, create a UTM link for a Facebook ad that includes a discount code like SUMMER20. In Shopify’s reports, you can filter sales by discount code to see how many conversions came from that specific ad. This helps you measure the ROI of your paid campaigns and optimize future promotions.

Shorten UTM links for public use (if needed): Long UTM links can look messy in social posts or emails. If you need a shorter URL, use a trusted URL shortener like Bitly or Shopify’s built-in link shortener after creating the UTM link. Always test the shortened link to ensure it preserves the UTM parameters. Avoid using shorteners that strip query strings, as this will break your tracking.

Document your campaigns: Keep a simple record of your UTM links and their corresponding campaigns outside of the links themselves. This can be a spreadsheet or a project management tool where you note the campaign name, source, medium, and the date it was published. This documentation helps you reference past campaigns and maintain consistency in your naming conventions.

If your UTM links aren’t tracking correctly in Shopify or Google Analytics, follow these steps to diagnose and fix the issue.

Check for duplicate UTM parameters: If your Shopify URL already contains UTM parameters (e.g., from a previous campaign), the UTM Link Builder will replace them with your new values. However, if you manually edit the URL and accidentally add duplicate parameters (e.g., utm_source=facebook&utm_source=email), Google Analytics may ignore one of them. Always use the tool to generate your UTM links to avoid this issue.

Verify URL encoding: Spaces and special characters in UTM values should be URL-encoded (e.g., a space becomes %20). The UTM Link Builder handles this automatically, but if you edit the link manually, ensure that all characters are properly encoded. For example, utm_campaign=summer sale should be utm_campaign=summer%20sale.

Confirm no redirects are stripping parameters: Some Shopify apps or third-party redirect services may strip query parameters from URLs. For example, if you use a link shortener or a landing page app that redirects to your Shopify store, test the final URL to ensure the UTM parameters are still present. If they’re missing, check the app’s settings or use a different redirect method.

Ensure Google Analytics is properly installed: UTM links rely on Google Analytics (or another tracking tool) to record the data. If your Shopify store doesn’t have Google Analytics installed, or if the tracking code is misconfigured, UTM parameters won’t be captured. To check, go to your Shopify admin, navigate to Online Store > Preferences, and verify that your Google Analytics tracking ID is entered correctly. You can also use Google’s Tag Assistant to confirm that the tracking code is firing on your store.

Review your Google Analytics reports: After publishing a UTM link, check your Google Analytics reports to see if the traffic is being attributed correctly. Go to Acquisition > Campaigns > All Campaigns to view data by campaign name. If you don’t see your campaign, wait 24-48 hours for data to populate, or check for filtering rules that might exclude the traffic.

Avoid using UTM links for internal navigation: UTM links are designed for external marketing campaigns, not for internal links within your Shopify store. Using them for internal navigation (e.g., linking from your homepage to a product page with UTM parameters) can overwrite the original traffic source and skew your analytics data. Instead, use clean URLs for internal links.