I want to send a coupon code in the email template. A Small button that will copy the content of a input element on the clipboard.
By email Template, i mean i want to send a email which will have a coupon code and there will be a button in the email template which will allow me to copy it to clipboard. Can this be done?
Any help will be appreciated.
Considering that javascript cannot be added inline to the email template, i couldnt think of any other solution.
Whether it is a sample of code or it is the User's own information, we can create a copy button to copy data to the clipboard using the navigator. clipboard. writeText() function. This function writes the data fed to it as a parameter into the clipboard.
Copying Text to the ClipboardCTRL+C to copy. CTRL+X to cut. CTRL+V to paste.
Short answer is No - This feature would require Javascript.
Long answer - Yes (in a different way) - You could use unique query strings on the button URL (eg ?USER=1&COUPON_CODE=123
) that way you could automatically carry the unique coupon code from the email to the landing page form field.
To do this you could assign each member in your database a unique coupon within the CSV file (or whatever you use) and set up a merge field within your ESP and use that to automatically create the strings. 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 providing the database is set up correctly.
Hope that makes sense.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With