In this article
Export cohort data to a specific local storage key
The Local Storage integration allows you to export cohort data to a specific local storage key. This is useful when you want to cache cohort data on the device, enabling you to quickly retrieve a CSV list of cohorts that the user is currently in.
Adding the Local Storage Integration
If you don’t already have the Local Storage integration enabled for your project, you’ll need to add it on your Permutive dashboard.
You'll need:
- Access to the Permutive dashboard
In the Permutive Dashboard:
- Login to your project, select ‘Settings → Integrations → Add Integration’
- Select Local Storage
Send your Publisher Cohorts to a Local Storage key
The Local Storage activation allows you to send any of your publisher cohorts directly to a specific local storage key, where you can use them to quickly retrieve a list of cohorts a user is currently in, under a unique Permutive cohort ID.
You'll need:
- Access to the Permutive dashboard
- A publisher cohort already set up, that you want to push to a local storage key
In the Permutive Dashboard:
- Login to your project, select ‘Cohort Activation' → 'Add Activation’
- Select the ‘Local Storage’ Action
- Specify a local storage key (eg. foobar)
- Set up the activation for your cohort. For more guidance on setting up activations, see this guide.
Example:
If you have this activation set up for different cohorts using the same local storage key, they will be combined as expected.
For instance, you have two cohorts, 1000 and 1001. Both have the local storage reaction enabled and configured with the key “foobar”. If the user has entered both cohorts, after executing localStorage.getItem("foobar")
, you will get [1000, 1001]
as the result.
Note:
- You must add a new activation for each cohort you send to local storage.
- If you have the DFP integration enabled, the cohort sent to DFP will automatically be present in _pdfps local storage key
- Your cohort will now be sent under its cohort code, which acts as a unique ID for the cohort. Each cohort's code is listed under the ‘Cohorts’ page in the Permutive dashboard.
If you have any questions, please contact customer support by emailing support@permutive.com or chat to the Customer Operations Team via the LiveChat icon in the bottom right corner of your screen.
Comments
0 comments
Article is closed for comments.