APIs & Integrations

GLittle9
Participant | Elite Partner
Participant | Elite Partner

How to embed email subscription page

SOLVE

I have an external site that is integrated with Hubspot via SSO.

 

How can I display the email subscriptions page in that site?  Presumably I'd need to use an iframe.  What URL would I use to view it?

 

 

0 Upvotes
1 Accepted solution
Anton
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

How to embed email subscription page

SOLVE

Hi @GLittle9

Displaying the preference-center on a non-HS page isn't possible by default. iFraming could could lead to CORS errors

 

A way to go could be be: recreate a form with your subscription types, modify the embed code, create one (or multiple) workflow(s) to have the same functionality as the regular preference-center and embed this form on your external page.

 

 

Hope this helps

 

best, 

Anton

Anton Bujanowski Signature

View solution in original post

5 Replies 5
Anton
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

How to embed email subscription page

SOLVE

Hi @GLittle9

Displaying the preference-center on a non-HS page isn't possible by default. iFraming could could lead to CORS errors

 

A way to go could be be: recreate a form with your subscription types, modify the embed code, create one (or multiple) workflow(s) to have the same functionality as the regular preference-center and embed this form on your external page.

 

 

Hope this helps

 

best, 

Anton

Anton Bujanowski Signature
Jaycee_Lewis
Community Manager
Community Manager

How to embed email subscription page

SOLVE

Hi, @GLittle9 👋 Thanks for the interesting question. Hey, @Anton @Jnix284 @SJaeger, have you pulled this one off in past projects? I wonder if this falls under not possible due to the nature of how that link is generated.

 

It's been a minute since I really messed with this page type, but my gut says the page is the “same”, but part of the URL is dynamic or unique for each contact. Does that sound correct? 

 

Thanks for taking a look! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

Jaycee_Lewis
Community Manager
Community Manager

How to embed email subscription page

SOLVE

Hi, @GLittle9 👋 Thanks for the interesting question. Hey, @Anton @Jnix284 @SJaeger, have you pulled this one off in past projects? I wonder if this falls under not possible due to the nature of how that link is generated.

 

It's been a minute since I really messed with this page type, but my gut says the page is the “same”, but part of the URL is dynamic or unique for each contact. Does that sound correct? 

 

Thanks for taking a look! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

GLittle9
Participant | Elite Partner
Participant | Elite Partner

How to embed email subscription page

SOLVE

We are exploring going with a two-prong approach where we will use the 'normal' subscription page and customize it to look as we need it. That is what will be linked to from emails, as usual.

 

Then for our external page, we'll use the API (/communication-preferences/v3/definitions) to get the list of possible subscriptions (in the order as they are defined) and display them on our page.   And use the API to get the subscription choices of the current user (known by their email). This external page will then that API to subscribe/unsubscribe the subscriptions that the user chooses.

 

Does that sound reasonable?

 

0 Upvotes
JLehmann
Participant

How to embed email subscription page

SOLVE

This sounds reasonable up to the point contacts try to resubscribe to any given subscription type. To my knowledge this does not work via workflows or API. The documentation says the following about this: 

 

"The subscribe contact endpoint allows you to subscribe an email address to any given subscription type in an account, but will not allow you to resubscribe contacts who have opted out."

 

This creates a dilemma i would be very keen to find a solution for.

0 Upvotes