Add this code snippet to your Shopify store to show a sign-up discount CTA on your product details page (PDP) to boost list growth. After the code snippet is added and a sign-up discount CTA is set up in Attentive, visitors to your store see discounted prices or other offer details next to a product's original price.
Prerequisites
- If you use Shopify for eCommerce:
- You have an administrator-level role or a role that permits you to edit store templates.
- Your Shopify store is integrated with Attentive and price data is available.
- You've already set up a welcome offer (% discount, dollar off, or other offer types) in your Attentive account.
- You've already created a sign-up discount CTA in Attentive.
Add the code snippet to your eCommerce store
Shopify
Where you add the sign-up discount CTA code snippet depends on which template editor you're using for your store. Here's how to check:
- Sign in to your Shopify store and select a store.
- Under Sales channels, click Online store > Themes.
- Click Customize on your current theme.
- Click the dropdown menu at the top of the page and select Products > Default product.
- Check to see which of the following appears below Template:
- A list of blocks and the + Add block button: you can add the code snippet with theme blocks.
- A list of sections and only the + Add section button: you can add the code snippet with code.
Option 1: Add the code snippet with theme blocks
- Follow steps 1-4 from above.
- Under Product information, click Add block and select {/} Custom liquid.
- Click the {/} Custom liquid block you added, and paste the following code snippet:
<div id="attn-inline-price-trigger"></div>
- Click and drag the six dots move icon next to the {/} Custom liquid block you added to where you want the sign-up discount CTA to appear on your product pages.
Note: We recommend placing it directly next to or below your product price. - Click Save in the upper right corner of the editor.
Option 2: Add the code snippet with code
- Follow steps 1-4 from the process above.
- Click the three dots on the top left of the page and select Edit code.
- Scroll to Sections and click product-template.liquid.
- Paste the following code snippet where you want the sign-up discount CTA to appear on your product pages:
<div id="attn-inline-price-trigger"></div>
Note: We recommend placing it directly next to or below your product price. - Click Save in the upper right corner of the code editor.
Other eCommerce platforms
Paste the following code snippet where you want the sign-up discount CTA to appear on your product pages:
<div id="attn-inline-price-trigger"></div>
Customize the appearance of sign-up discount CTAs
The sign-up discount CTA follows the default styling of the "button" class on your website. If you want to customize its appearance:
- You can add additional CSS classes to the div element, for example:
<div id="attn-inline-price-trigger" class="your-custom-class"></div>
- Alternatively, you can use inline styles:
<div id="attn-inline-price-trigger" style="your-custom-styles-here"></div>
Test and optimize sign-up discount CTAs
To maximize the effectiveness of your sign-up discount CTA:
- Test the sign-up unit on various product pages to ensure it displays correctly.
- Consider running an A/B test to measure the impact on subscriber growth and conversions.
- Monitor your analytics in Attentive to track performance and make data-driven decisions.
If you run into any issues or have questions about implementing the sign-up discount CTA, please reach out to your Attentive CSM or White Glove (whiteglove@attentivemobile.com).