Availability
This version is currently available.
Paywall Javascript version 1.0¶
Target audience: Developers, Stakeholders
Including the javascript¶
For the Tulo Paywall to function as it should, you will need to include our JS on your site. Choose the correct file, depending on what environment you are working in.
Environment | URL |
---|---|
Production | https://payway-cdn.worldoftulo.com/js/paywall.js |
Staging | https://payway-cdn-stage.adeprimo.se/js/paywall.js |
Attributes available on initialization¶
Below is a list of attributes available for use when initializing the Paywall Javascript v 1.0.
Attribute | Type | Description | Required | Available as resource in Paywall template |
---|---|---|---|---|
url | string | Tulo Paywall URL | Yes | No |
jwtToken | string | Generated server side in Step 4 | Yes | No |
debug | boolean | Set to true for additional information when troubleshooting | No | No |
accountOrigin | string | Read more about Account origin | No | No |
trafficSource | string | Read more about Traffic source | No | No |
merchantReference | string | Read more about Merchant reference | No | No |
returnUrl | string | Read more about Return url | No | Yes, [RETURN_URL] |
backUrl | string | Can be used as an alternative link back to the website from Tulo Shop, not to be mistaken for the returnUrl. | No | No |
loginUrl | string | Can be used to display a link for the customer to log in. | No | Yes, [LOGIN_URL] |
shopUrl | string | Can be used for displaying a custom link to the Tulo Shop. For example to all available offers. | No | Yes, [SHOP_URL] |
utmSource | string | GA support | No | No |
utmMedium | string | GA support | No | No |
utmCampaign | string | GA support | No | No |
utmContent | string | GA support | No | No |
resources | object | Overridable text resources. You'll find the available resources and default values here. | No | No |
engageTracking | object | Engage BI tracking meta data | No | No |
articleId |
string | If the Tulo Paywall is initiated from an article add the articleId to this parameter. | No | No |
categories |
array | Categories e.g. ["cat 1", "cat 2"] | No | No |
sections |
array | Sections e.g. ["sec 1", "sec 2"] | No | No |
onError | function | Callback if a Tulo Paywall error occurs. Will override default onError behavior. Read more here. | No | No |