- Overview
- Step 1: Create an AdCode
- Step 2: Create Discount
- Step 3: Add Link Containing AdCode to Site
Overview
This article is a stepy-by-step guide to creating a link, that when clicked by the customer, will apply a discount to their cart. This is done using AdCodes. AdCodes are strings of text that can be used to track conversions and visitor activity. AdCodes can be embedded into links on your site using URL Query Strings. When a customer clicks on the link, the AdCode will be attached to their visitor session. Once attached to the session, the AdCode can then be used to trigger discounts.
Step 1: Create an AdCode
Navigate to Marketing > Power Features > AdCodes, and click New:
On the AdCode Edit Screen:
- Enter code
- Optionally enter expiration date
- Save
Once the AdCode is created, it can be added to URLs and links for reporting and analytics. For example, the AdCode created in the screenshot is summersale; it can be added to a URL like so: http://www.yourdomain.com/?a=summersale
When someone visits the site through that URL, their visit will be added to the AdCode Stats on the Adcode Edit Screen:
Step 2: Create Discount
Navigate to Marketing > Discounts, then:
- Click New to open the Edit Discount Method Screen
- Give the discount a name, and click Save
- At the Bottom of the Edit Discount Screen, Click New Rule
- Change the Rule Type to adcode
- In the Target field, type the adcode
- Save the Discount Rule
- Add a discount action
- Make sure the discount and action are active
- Save the discount
Step 3: Add Link Containing AdCode to Site
Below is example HTML demonstrating several ways to add an AdCode to a hyperlink:
<!-- Homepage -->
<a href="http://www.yourdomain.com/?a=summersale">Homepage</a>
<!-- Shopping Cart -->
<a href="http://www.yourdomain.com/store/shopcart.aspx?a=summersale">Shopping Cart</a>
<!--Relative URLs Also Work -->
<a href="/?a=summersale">Homepage</a>
<a href="/shopcart.aspx?a=summersale">Homepage</a>
A link containing an adcode can be added almost anywhere on your site. Simply add HTML like above to the desired page's HTML.
There are multiple edge case scenarios where this is useful. For example, this combines with our embedded commerce feature. Using these features, its possible to have a banner advertisement somewhere else on the internet provide a discount. You could also turn this into a pop up window. Then if clicked, it will associate the discount with their session. There are so many creative ways to use this. We'd also love to hear your ideas for this! Let us know in the comments if you have any questions, or have come up with a creative way to use any of these features.