-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PubCommonId - Add support for localStorage (#3661)
* Add support for localStorage * Pubcid uses local storage first
- Loading branch information
Showing
3 changed files
with
366 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## Publisher Common ID Example Configuration | ||
|
||
When the module is included, it's automatically enabled and saves an id to both cookie and local storage with an expiration time of 1 year. | ||
|
||
Example of disabling publisher common id. | ||
|
||
``` | ||
pbjs.setConfig( | ||
pubcid: { | ||
enable: false | ||
} | ||
); | ||
``` | ||
|
||
Example of setting expiration interval to 30 days. The interval is expressed in minutes. | ||
|
||
``` | ||
pbjs.setConfig( | ||
pubcid: { | ||
expInterval: 43200 | ||
} | ||
); | ||
``` | ||
|
||
Example of using local storage only and setting expiration interval to 30 days. | ||
|
||
``` | ||
pbjs.setConfig( | ||
pubcid: { | ||
expInterval: 43200, | ||
type: 'html5' | ||
} | ||
); | ||
``` | ||
|
||
|
||
|
Oops, something went wrong.