All Collections
Tips and Tricks
Copy-to-Clipboard Feature
Copy-to-Clipboard Feature

How to use our copy-to-clipboard function to make it easier for customers to copy-paste content, like prize codes, on your campaigns

Asta Dybdal avatar
Written by Asta Dybdal
Updated over a week ago

In the world of digital user experiences, even small enhancements can make a big difference.

With the copy-to-clipboard feature, you can create a simple, user-friendly way to copy content in a campaign. This could for example be a discount code that players can use on your website, a daily quote, a useful link, etc.

In the following sections, we will:

  • Showcase examples of how you can use the feature in your campaigns

  • Provide guidance on how to set up the copy-to-clipboard function

How to set it up

The copy-to-clipboard function is a feature that you can add to a button. On buttons that are not part of the actual game flow, you can set the action of the button to: ‘Copy-to-Clipboard’.

You have two options for choosing what should be copied when clicking the button:

  • A custom value

  • A replacement tag

Below we will describe both options.

Copy a generic value

A value can be almost any custom piece of information. It can contain both numbers, letters, and special characters.

Below you can see an example of how the copy-to-clipboard function is used in a game where losers of the game are offered a generic discount code:

Note that if you insert a value to be copied, the value is not dynamic; this means that the value copied will be the same for all participants. If you want to include dynamic content, you should use a replacement tag as a value instead. Read more below.

Copy a replacement tag

With the copy-to-clipboard feature, It is possible to copy dynamic content by using replacement tags. This is useful if you want to copy information that is connected to the individual game player.

If you are giving out prizes, you may want to share the unique code that is connected to a specific prize. By using the replacement tag #bulk_prize_code#, the copy-to-clipboard function will copy the prize code related to the won prize.

Based on the above settings, you can see in the below example how the bulk prize code is both showcased in the textbox and added as a value in the copy-to-clipboard function.

We hope that this article has inspired you on how to incorporate a copy-to-clipboard function in your games. If you need further assistance setting one up yourself, you can always reach out to our support team.

Enabling Copy-to-clipboard in an Iframe

Iframes inherently restrict certain functionalities, including clipboard access. If you're experiencing issues with the copy-to-clipboard function within an embedded iframe, it may be due to restrictions imposed by the iframe itself. To resolve this, you'll need to modify the "allow" attribute in the iframe script.

In the iframe script, you'll find an "allow" attribute. It likely appears something like this:

allow="autoplay; fullscreen"

To enable clipboard access, you need to add "clipboard-write" to the "allow" attribute.

Modify the script as follows:

allow="autoplay; fullscreen; clipboard-write"

After making the adjustment, the copy-to-clipboard function should now work as expected, allowing users to copy content within the embedded iframe.


Search terms: kopi, kopier, kopiér til udklipsholder, copy paste
Did this answer your question?