Clerk.js

Running Merchandising Campaigns Dynamically in Embedcodes

Check how to trigger a Merchandising Campaign directly from the frontend. 

Merchandising Campaigns are handled from my.clerk.io -> Merchandising.

The Campaigns use Triggers to decide where it should be used, like on a specific search or when viewing certain products.

However, Campaigns can also be triggered directly from any Clerk.io embedcode by adding data-merchandising=["INSERT_CAMPAIGN_ID"].

1. Start by creating a Campaign with no Triggers, and note the ID of the campaign from the URL:

 

2. Now you can trigger this campaign from any Clerk.io embedcode:

<span class="clerk"
  data-template="@home-page-popular"
  data-merchandising=["boost-bracelets"]
></span>

 

Using this method, you can create logics in the frontend for when you want to apply a Campaign. 

 

Tip: If you want to apply multiple Merchandising campaigns to the same code, you can add multiple ones in data-merchandising:

<span class="clerk"
  data-template="@home-page-popular"
data-merchandising=["boost-bracelets", "boost-high-margin", "remove-out-of-stock"]
></span>

 

 

Did this answer your question?