How to refresh dynamically the content of your placements.
data-purchase-amount
).
You can do it with this little snippet of JavaScript:
newPurchaseAmount
with the actual value you want to set, in the same format as the one you set in the placement.data-purchase-amount
data attribute is updated.
If you are also using custom variables in your placements, you will need to update them and then trigger the refresh manually, using the refresh
function.
For example, letβs say you are using the category
variable in your placement, and you want to refresh the placement when the shopper changes the category:
id
of the specific placement you want to refresh, you can do it with a single line of JavaScript: