Overview
Dynamic Linking pins specific products to the top of collection pages when customers arrive from your advertising campaigns, so the products featured in your ad creative appear first on the landing page. Common use cases:- Social media ads featuring specific products
- Google Shopping campaigns with product images
- Email campaigns featuring specific items
- Influencer partnerships highlighting specific products
How it works
When you drive traffic to a collection page from an ad, you can pass product identifiers (handles or IDs) via the Browse API’sdynamicLinking parameter. The linked products appear at the top of the first page, regardless of your merchandising rules or sort orders.
Priority hierarchy:
- Dynamic Linking (first page only)
- Merchandising Rules
- Base Sort Order
Example scenario
You’re running a Facebook ad featuring three specific necklaces. When customers click the ad and land on your “Necklaces” collection page, you want those three products at the top. They should appear in the same order as shown in the ad. Without Dynamic Linking: Customers see products sorted by your default sort order, which may not include the advertised products at the top. With Dynamic Linking: The three featured necklaces appear at positions 1, 2, and 3, exactly as shown in your ad.Automatic dynamic linking via URL parameters
If your store has the Layers tracking pixel installed, Dynamic Linking works automatically when customers arrive on a collection page with autm_products URL parameter. You don’t need a custom API integration.
How automatic dynamic linking works
- You include a
utm_productsparameter in your ad’s destination URL - Product handles are separated by underscores (
_) - The Layers tracking pixel detects the parameter and automatically injects the
dynamicLinkingpayload into the Browse API request - The specified products appear pinned to the top of the collection page
URL format
gold-chain, silver-pendant, and diamond-choker to positions 1, 2, and 3 on the collection page.
Starting pinned products at a later position
By default, linked products take the top positions (1, 2, 3, …). To leave the first few products of the normal collection order in place, add autm_products_offset parameter. The offset is the number of positions to skip, so utm_products_offset=2 places your first linked product at position 3.
gold-chain and silver-pendant at positions 3 and 4. An offset is useful when you want ad-driven products to appear near the top without displacing your highest-priority merchandised items.
Setting up your ad URLs
When creating ads on platforms like Facebook, Google, or email campaigns, append theutm_products parameter to your collection page URL:
The
utm_products parameter works alongside standard UTM parameters (utm_source, utm_medium, utm_campaign) for combined attribution and merchandising.Requirements
- The Layers tracking pixel must be installed on your storefront
- Product handles in
utm_productsmust match your Shopify product handles exactly - Handles are separated by underscores (
_) utm_products_offsetis optional and must be a positive whole number
Manual API implementation
If you need more control, you can also implement Dynamic Linking directly via the Browse API. Your development team needs to:- Identify the products featured in your ad (by handle or ID)
- Pass these identifiers in the
dynamicLinkingparameter when calling the Browse API - Ensure the API call is triggered when customers arrive from your ad campaign
Behavior and constraints
- First page only: Dynamic Linking only applies on page 1 of results, except for products from outside the collection
- Optional offset: Set
offset(orutm_products_offset) to skip the first N positions, so linked products occupy positions N+1 onward - Graceful handling: Layers silently skips non-existent or unavailable products
- Automatic shifting: Subsequent products shift up to fill any gaps
- Mixed identifiers: You can use product handles (strings) and IDs (numbers) in the same array
- Order matters: Products appear in the exact order you specify in the array
Linking products that aren’t in the collection
By default, Layers only places linked products that belong to the collection being browsed. Products from outside the collection are skipped. To let ads feature products from anywhere in your catalog, turn on Allow Out-of-Collection Dynamic Linking in the Dynamic Linking card under Settings → Developer → Response Options, then click Save. Linked products then appear at the top of the collection even if they aren’t members of it. With the setting on:- Placement works the same way. Linked products from outside the collection follow the same order, offset, and position rules as linked products from inside it.
- Other visibility rules still apply. A linked product from outside the collection still has to be published, available in the shopper’s market, and match any filters the shopper applied. Otherwise it’s skipped.
- Some filters can hide it. Filters that depend on collection membership may leave out linked products from outside the collection. The Filter visibility warning on the settings card points this out.
- Filter counts don’t change. Filter options and their counts reflect only the collection’s own products.
- Each product appears once. Linked products count toward the collection’s total results and aren’t repeated on later pages. If an offset or position pushes a linked product past the first page, it appears on the page where that position falls.
Enabling dynamic linking
The Layers team needs to configure Dynamic Linking for your store. To enable Dynamic Linking:1
Contact support
Reach out to the Layers support team via your dedicated Slack channel or email support@uselayers.com.
2
Provide use case details
Share information about your advertising campaigns and how you plan to use Dynamic Linking.
3
Select your implementation
Option A (Recommended): If the Layers tracking pixel is installed, add
utm_products to your ad URLs. No development work is needed.Option B: For custom implementations, work with your development team to use the Browse API’s dynamicLinking parameter directly.4
Testing
Test your implementation by visiting a collection page with the
utm_products parameter and verifying the specified products appear at the top.Tips for success
- Coordinate with marketing: Ensure your merchandising team knows which products are featured in active ad campaigns
- Track performance: Monitor conversion rates for ad traffic to measure the impact of Dynamic Linking
- Keep it relevant: Only pin products that are actually featured in your ad creative
- Limit the number: Pin 3-5 products maximum to maintain a natural browsing experience
- Update regularly: As ad campaigns change, update your Dynamic Linking configuration to match