Manual link decoration
Fanplayr provides a JavaScript API for manually augmenting URLs with parameters needed to continue sessions between domain names.
This method is necessary in scenarios where navigation occurs using a method which Fanplayr cannot automatically handle, such as navigation via the global
window.location
object.This method is also a good choice for developers who want maximum control over link decoration process.
The following utility function should first be defined near the top of your webpage:
Next, update any JavaScript that causes navigation between domains to make use of the utility function. For example, assume there is a button on the webpage navigate to a checkout on a separate domain when clicked:
The website could be updated as follows:
Last updated