Expand my Community achievements bar.

Copy discount code within HTML (copy to clipboard functionality in html)

Avatar

Level 1

Hello, 

 

 

Our client wants to implement a copy to clipboard functionality in an email, however when we send proofs to ourselves it does not work as expected (see an example of what we need below). If anyone has an html/js script that works for adobe campaign would be great.

YiannisSk_0-1731940125221.png

Appreciate any help beforehand. 

 

BR,Yiannis

 

2 Replies

Avatar

Level 1

Hello Yiannis, 

 

Most modern email clients do not allow JavaScript execution so this will not be feasible.

Avatar

Level 1

Hey @YiannisSk !

Unfortunately, adding a coupon code directly into an email isn't possible because it relies on Javascript, which emails can't use.

 

Here's a quick approach on how did I achieve this :
We can create a unique URL for each member using their coupon code. This way, when they click the link in the email, it automatically adds the code for them.
For example, your string would look like this when you code it: href="http://www.yousite.com/?[%coupon%]," and your ESP will do the rest, provided the database is set up correctly.

 

Hope this helps!

Regards,

Abhinav