Clerk.io is a product recommendation tool that use embed codes on web and in e-mail to recommend products. Im trying to setup an integration to create HubSpot freindly embedcodes.
I have gotten the following in writing from Clerk.io. Anyone that can help us out?
"Due to the way Clerk.io works, 1 embedcodes HTML can generate completely different
products if opened today vs in one week. However most browsers and email clients will cache an image, and show the cached version the next time the exact same link is shown.
To avoid this, and be able to always show the correct products, we need a tag / cachebuster that will be rendered into something that is unique for each campaign, so the same embedcodes can be included
Oct 23, 20204:21 AM - edited Oct 23, 20204:22 AM
Participant
Clerk.io integration
The {{ unixtimestamp }} does sound like what I need - I am not completely sure how Custom Modules work though. Is it something I can install in HubSpot? Sorry, I am still a bit of a noob 😉
Oct 22, 202010:41 AM - edited Oct 22, 202010:42 AM
Participant
Clerk.io integration
Hi all. Stefan from Clerk.io!
Just to elaborate on Jonchim's example - there is no need for additional CSS, HTML or JS in the emails.
A full 1-product email recommendation from Clerk consists of two parts, both containing an API call: 1. A link in an <a> element with a call to campaigns/click
2. An image with a link to campaigns/embed - this will be the actual visual representation of the product. The campaigns/embed call returns a fully rendered image based on HTML and CSS in the Clerk.io backend.
The reason why we need a cachebuster is that the above embed code can be included in a basic HubSpot template and thus be included in maybe 15 emails over the course of the month. However, if most browsers identify the same image link being shown again, they will see a cached version.
Imagine that the customer sees product X in the first email they get. Then they get a new email a week after, and this time, Clerk.io would serve product Y. But without a cachebuster, the link is the same, so the result is cached, meaning the browser would still show product X.
So we simply need any sort of unique text that can be generated automatically, the same way you can insert the email address with {{ contact.email }}. I imagine something like {{ timestamp }}.
{{ unixtimestamp }} would probably suit this need, but it is unline a personalization token. It will need to be added to the custom module as @jonchim has illustrated
If that is all that is needed once you're in the email template drag and drop builder you can click on the + more on the left hand side. It'll give you more options, if you look at the screenshot there's a custom moduel for clerkio, that's just an example I created. Let me know if this helps, or if this is not what you're looking for.
I want to confirm this is what you are trying to do (I am slow 😉 )
You send an email to me which contains an image
I look at the email today
I open the email again in a week. The link in the email should contain a different query param so that we make sure it isn't a cached image being displayed
If that is the case, I don't know if it is possible 🤔 . Javascript is a no no for email. If this is possible, I would love to see an example of how they made this work with email!
Hey there, If this is for an email embed, a custom module will definitley be need since the HTML support is very limited in the drag and drop builder. I'm not entirely sure on the cache concern, we would need a bit more details.
We would need to know more about the setup. If I am reading this correctly, what you are wanting to do is add an embed code with a unique "cache-busting" parameter onto a HubSpot page.
If that is correct, will you be making a custom module for this?
Are you needing development help or will you be building this in house?
@jonchim , @alyssamwilie , @Anton if I am reading the question correctly, I believe this can be solved with some hubl :). What do you all think?
Thank you for your reply. Yes we are trying to add an embed code with a unique cache-busting parameter, but not on a HubSpot page, but in a HubSpot e-mail. We use clerk to send personal recommendations and add these to our newsletters connecting with our subscribers. But we need the cachebuster to make sure we can link the clerk visitor ID with the HubSpot user correct.