In this article, we'll explain how to set up the automated customer tracking and single sign on system.
This allows you to automatically identify customers who are logged into your platform or app to your ProductFlare board so that their activity is automatically tracked.
First, embed the Ideaboard into your application or website using the embed popup in ProductFlare.
Next, you'll want to call the following function (make sure to copy and paste all the code) when your page loads or when your user's identity is likely to change, for example when they log in.
The properties marked with < > are variables you need to set, so for example you would set the 'email:' property to be the variable/data call that stores your current user's email. We have omitted "" quotation marks for the variable names, assuming you will pass a variable. If you pass a fixed text please ensure to add "" to the text, for example email: "their email".
The <UNIQUE_ID_OF_PRODUCTFLARE_IDEABOARD> must be replaced with the ID of the Ideaboard in ProductFlare. This is the string of text and numbers in the URL after /index when you are on ProductFlare.
//ProductFlare SSO Code Start //Call this function on page load or when your user logs into your app function productFlareSSO() { var customer = { avatarURL: <your_customers_avatar_url>, //This is optional but recommended email: <your_customers_email>, firstName: <your_customers_first_name>, lastName: <your_customers_last_name>, }; var frame = window.frameElement; frame.src = "https://boards.productflare.com/index/<UNIQUE_ID_OF_PRODUCTFLARE_IDEABOARD>?e="+customer.email+"&f="+customer.firstName+"&l="+customer.lastName+"&a="+customer.avatarURL; console.log('A user with name' +customer.firstName+" "+customer.lastName+" was sent to ProductFlare"); } //This comment marks the end of the ProductFlare SSO code