When you receive feedback, you should know who gave it (free user, paid user, or enterprise customer). But more importantly, you want to inform them what you do with their feedback.
For this, we need to gather their email address to contact them, and it would be logical if users could log in again when they have additional feedback or questions.
For this reason, ProductLift has user accounts, and people can sign up for a new account and leave feedback.
When you want users to avoid creating a new account (people may forget passwords), you have two options.
In this article, we are going to set up #2 and #3.
β
β
We use a secure protocol called JSON Web Token (JWT) to enable SSO to transfer user authentication data from your system to ProductLift. JWT is open, simple, and with solid community support. You can read more about it on theΒ IETF website, and you'll be able to find a large number of open-source implementations for most languages.
β
The most simple sign-on is using our Javascript SDK.
You should load the SDK in your app.
Then add the identify script, like below.
<script>
window.PQ=window.PQ||[];window.ProductLiftIdentify=window.ProductLiftIdentify||function(u){PQ.push(u)};
ProductLiftIdentify({
email: 'john@example.com',
uid: '123',
name: 'John Doe',
// Optional
avatar_url: 'https://example.com/avatar.jpg',
company: 'ACME Corp',
mrr: '99.99',
// Optional segment fields:
segment_1: 'developer',
segment_2: 'premium',
segment_3: 'early_adopter',
// ... up to segment_10
arr: '1199.88',
ltv: '3599.64'
});
</script>
With SSO arranged, you can add data-productlift-link to enable auto login for an URL.
<a href="https://feedback.yourdomain.com" data-productlift-link>See our roadmap</a>
You can also use this in iFrames, for example.
<iframe src="https://1.productlift.test:7890/t/wish-list?widget_id=a4351156-d05a-4989-8c72-bf6cf88a99ae" data-productlift-link width="100%" height="600px" frameborder="0"></iframe>
In case you cannot add elements to these HTML codes (some website builders block it), you can add "data-productlift-link" as a class.
You should create a JWT token on your end using the SSO secret that we provide.
You can find your SSO secret at Settings > Single Sign On.
β
Generate a JWT SSO token on your end and sign it with your SSO secret. You can find several examples of creating a token on theΒ Β IETF website.
The contents should look something like this:
$payload = [
'email' => 'john@me.com',
'uid' => '123',
'name' => 'John James',
// 'avatar_url' => 'https://i.pravatar.cc/150?img=61',
// 'segment_1' => 'developer',
// 'company' => 'ABC',
// 'mrr' => '10.99',
];
$token = JWT::encode($payload, $private_key, 'HS256');
β
Explaining the fields in the payload:
β
β
β
β
When you have the token, you can apply it easily by adding ?sso=TOKEN to any url of your portal.
For example:
It is possible to add the token to the ProductLift SDK. This way users can interact with the widgets without logging in.
<a href="#" data-productlift-sidebar="3b31866b-b281-437f-b3f5-928f9a8fab35">Open Widget</a>
<!-- ProductLift SDK - Include it only once -->
<script defer src="https://1.productlift.test:7890/widgets_sdk?sso=TOKEN"></script>
This data is currently visible to administrators on the user's profile page. Click on the user to view their profile.
In upcoming updates, you'll gain the ability to filter posts and categorize 'likes' based on this data, enhancing user engagement insights and content targeting.
β
6 months ago