Skip to content

Instantly share code, notes, and snippets.

@luctus
Last active May 20, 2026 16:45
Show Gist options
  • Select an option

  • Save luctus/b3605c81f4718f43e1da7ee98de59c66 to your computer and use it in GitHub Desktop.

Select an option

Save luctus/b3605c81f4718f43e1da7ee98de59c66 to your computer and use it in GitHub Desktop.
As a user, I want to see that LG has Student offers while I'm browsing a specific product, click on it, get verified and get redirected to the same product in the Students Store.

Implement On-Site Messaging on Product Pages

As a user, I want to see that LG has Student offers while I'm browsing a specific product, click on it, get verified and get redirected to the same product in the Students Store.

We can achieve this the same way Samsung is doing it, via the On-Site Messaging product from Gocertify. Take a look at this video to understand the general journey.

Current shopper's journey

Before jumping into details, let's review the current integration, step by step:

Recommendation to improve analytics: Remove the utm parameters in Partnerize, so Sessions are not mixed up in Google Analytics or other provider

Technical implementation

This banner will be loaded only in certain products. LG will have access to Gocertify's dashboard and upload a list of all the SKU's that should display the banner.

This integration requires 2 little changes to existing integration:

  1. Add a new component wherever the banner should appear
  2. Update the /uk/partners page to do a final (and optional) redirect

1. Add the new component

First, we need to make sure the gocertify.js script is loaded in every Product page.

Then, in the product page template, we need to add this line of code wherever you want to load the new banner (remember that it won't be loaded every time, only for the SKUs specified in the Gocertify dashboard):

<gocertify-target identifier="{{ the SKU of the product }}"></gocertify-target>

2. Add optional redirect at /uk/partners page

Once the shopper finishes their verification in Gocertify, they are currently landing in this page:

https://www.lg.com/uk/partners/?clicktimestamp=20260424105450&signedtoken=1d6349e7&signature=a873d7e3d62877020dac886a05660ee652f2a782bf7bf7878ba368e8c6103b41&clickref=1101lDgmzU6I&utm_source=partnerize&utm_medium=affiliate&utm_content=gocertify

Now, there will be a new extra parameter called pdp that will contain the path where the user should be redirected after the authentication process being done using the clicktimestamp + signedtoken + signature parameters. For example:

https://www.lg.com/uk/partners/?clicktimestamp=20260424105450&signedtoken=1d6349e7&signature=a873d7e3d62877020dac886a05660ee652f2a782bf7bf7878ba368e8c6103b41&pdp=%2Fmonitors%2Fgaming%2F45gx950a-b%2Fbuy&clickref=1101lDgmzU6I&utm_source=partnerize&utm_medium=affiliate&utm_content=gocertify

Note that pdp=%2Fmonitors%2Fgaming%2F45gx950a-b%2Fbuy.

The user should now be redirected to:

https://www.lg.com/uk/partners/monitors/gaming/45gx950a-b/buy/?clickref=1101lDgmzU6I&utm_source=partnerize&utm_medium=affiliate&utm_content=gocertify

It's super important that the clickref parameter stays in that final redirect. All the other parameters are optional.

Remember that there will be cases where that pdp parameter is not present (or empty). This happens when the user didn't start their journey from a specific product page, and did it from the Students page instead.

Example journey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment