APIs & Integrations

PascalF
Member

Double Opt in and Params in the confirmation url

Hi,

 

I'm trying to find a way to pass a parameter to the landing page of the double opt in email confirmation process. I've setup double opt in emails, added a parameter (as described in  https://community.hubspot.com/t5/APIs-Integrations/double-opt-in-redirect-with-params/m-p/305004 ) to the confirmation link and created a landing page. 

However, after a user clicks the confirmation link, the parameter doesn't get passed on to the landing page.

 

Looking at the network console, I can see that the param is correctly set for the actual double opt in confirmation request, but gets lost in the confirmation page.

 

What am I missing here? The original question I linked above was marked as resolved, however I can't get this working so I'm clearly making a mistake here

PascalF_0-1604535591019.png

 

0 Upvotes
3 Replies 3
aiandy
Participant

Double Opt in and Params in the confirmation url

Curious, did you ever get this working?  I'm running into similar issues.

0 Upvotes
PascalF
Member

Double Opt in and Params in the confirmation url

@dennisedson tanks for your reply. My confirmation link in the double opt in email looks like this:

 

<a href="{{ subscription_confirmation_url }}&email={{ contact.email }}" rel="noopener">Confirm</a>

 

 Please not that `{{ subscription_confirmation_url }}?email={{ contact.email }}` as described in the linked solution doesn't work because subscription_confirmation_url already contains params and attaching another param with `?` instead of `&` doesn't work and leads to a server error in hubspot (i triggered quite a few of them yesterday 😉 )

 

Also, the email param is correctly attached to the first request to  the `/email/v1/optin/confirm/doi` url (as shown in my screenshot). However, in the redirect to the landingpage (after the doi endpoint has confirmed the opt in) the param gets lost. I'm not surprised by this because I don't expect the `/doi` endpoint to forward arbitary params to the landingpage. However, since this was a proposed solution by hubspot and confirmed by @JosephWa I'm hoping I'm just missing a detail here.

 

Thank you for your help and time

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Double Opt in and Params in the confirmation url

Hey @PascalF 

Could you post your code here so we can take a look? 

Perhaps @JosephWa  could help here, too considering he has it working 😃

0 Upvotes