Copy Paster Observer
Capping can help you find out how your users are using copy/paste. If you want to prevent subscribers from sharing their account, you'll probably want to prevent your subscribers from copying your content and sharing it with their friend. Wouldn't you?
Copy Paste Observer will analyze the use of the "copy" feature, and will be able to modify the copied content.
Copy Paster Observer without any change in the copied content, just monitoring
User journeys
- USER 1 reads a paid article
- USER 1 copies the content to send it to a friend
JavaScript integration
You previously learned how to use Capping to detect and block simultaneous readings, or simultaneous devices. Now, you can add to your Capping integration dedicated configuration for Copy/Paste tracking.
<script>var siriusCapping = window.siriusCapping || {};siriusCapping.config = {brand: "<BRAND_UUID>", //mandatoryuserId: "<THE_USER_ID>", //mandatorymode: "device|reading", // copy paste observer works with these two modescopyPasteObserver: {enable: true,characterLimit: 140, // Number of characters copied from which you want to track},};</script><script async src="https://capping.sirius.press/sdk.v1.1.0.js"></script>
Param | Type | Description |
---|---|---|
siriusCapping.config.brand | string | A brand uuid that we'll give you |
siriusCapping.config.userId | string | The ID of the user, that you can write encrypted or hashed |
siriusCapping.config.mode | string | Two modes are available, reading (default) and device . Copy Paste Observer works with these two modes |
siriusCapping.config.copyPasteObserver.enable | bool | Set it to true if you want to activate Copy Paste Observer |
siriusCapping.config.copyPasteObserver.characterLimit | int | A number of characters copied from which you want to track |
Copy Paster Observer with changes on the copied content
User journeys
- USER 1 reads a paid article
- USER 1 copies the content to send it to a friend
- USER 1 pastes the copied content into an email, but sees that the content has been modified.
JavaScript integration
Use modifications
array to change copied content.
<script>var siriusCapping = window.siriusCapping || {};siriusCapping.config = {brand: "<BRAND_UUID>", //mandatoryuserId: "<THE_USER_ID>", //mandatorymode: "device|reading", // copy paste observer works with these two modescopyPasteObserver: {enable: true,characterLimit: 140, // Number of characters copied from which you want to trackmodifications: [{type: "prepend|append|replace",text: "<br>This is a message that will be added before/after the copied content or will replace it (depending on the modification type)<br><br>",},],},};</script><script async src="https://capping.sirius.press/sdk.v1.1.0.js"></script>
Param | Type | Description |
---|---|---|
siriusCapping.config.copyPasteObserver.modifications | object | An array of objects that defines the changes to be made to the copied content, if any. Each object contains the following keys |
siriusCapping.config.copyPasteObserver.modifications[].type | string | A string that indicates the type of modification to be made. The possible values are prepend (to add text at the beginning), append (to add text at the end) and replace (to replace the copied content). |
siriusCapping.config.copyPasteObserver.modifications[].text | string | A string that contains the text to add or replace in the copied content. |
Complex copied content replacement with counter feature
The modifications
array allows you to change the type of replacement depending on the number of copy occurrences.
<script>var siriusCapping = window.siriusCapping || {};siriusCapping.config = {brand: "<BRAND_UUID>", //mandatoryuserId: "<THE_USER_ID>", //mandatorymode: "device|reading", // copy paste observer works with these two modescopyPasteObserver: {enable: true,characterLimit: 140, // Number of characters copied from which you want to trackmodifications: [{type: "prepend",text: "<br>This is a message that will be added before the copied content<br><br>",},{type: "replace",text: "This message will replace the copied content after 5 copies.",count: {min: 5,max: 10,}}{type: "replace",text: "This message will replace the copied content after 10 copies, and will stop counting.",count: {min: 11,stopCounting: true}}],},};</script><script async src="https://capping.sirius.press/sdk.v1.1.0.js"></script>
Param | Type | Description |
---|---|---|
siriusCapping.config.copyPasteObserver.modifications | object | An array of objects that defines the changes to be made to the copied content, if any. Each object contains the following keys |
siriusCapping.config.copyPasteObserver.modifications[].type | string | A string that indicates the type of modification to be made. The possible values are prepend (to add text at the beginning), append (to add text at the end) and replace (to replace the copied content). |
siriusCapping.config.copyPasteObserver.modifications[].text | string | A string that contains the text to add or replace in the copied content. |
siriusCapping.config.copyPasteObserver.modifications[].count | object | An optional object that defines limits on the number of times the change should be applied. It contains the following keys. |
siriusCapping.config.copyPasteObserver.modifications[].count.min | int | An integer that defines the minimum number of copies to apply the change. |
siriusCapping.config.copyPasteObserver.modifications[].count.max | int | An integer that defines the maximum number of copies to apply the change. |
siriusCapping.config.copyPasteObserver.modifications[].count.stopCounting | bool | A boolean that defines if the counter should stop counting after the maximum number of copies. |