Lists, Lead Scoring & Workflows

Nikboe
Participant

Send JS generated URL per E-Mail

SOLVE

Hi,

 

we generate an URL based on a form that is entered with JavaScript, e.g. https://URL.io/welcome-affiliate?affiliate=company-name

 

They get send to this URL directly after filling in the form.

 

Now I would like to send this link per E-Mail as well, but I obviously can't integrate JavaScript in the E-Mail that is send out.

 

How can I do that?

Thanks!

 

 

 

 

0 Upvotes
1 Accepted solution
Nikboe
Solution
Participant

Send JS generated URL per E-Mail

SOLVE

Thanks for your answer!

 

I solved the problem:

 

1) Create a hidden field in the form

2) Use script to populate the form before sending it: $form.find('input[name="affiliate_id"]').val(affiliateID).change();

 

affiliate_id is the form field, affiliateID ist my variable.

View solution in original post

0 Upvotes
4 Replies 4
MikeCormack
Top Contributor

Send JS generated URL per E-Mail

SOLVE

<a href=URL.com?affiliate={{ contact.company_name }}>link</a>

You may need to put in the %20s into a custom company name field, if so you could have a hidden field and add it in on the fly with some more js 

Nikboe
Participant

Send JS generated URL per E-Mail

SOLVE

Thanks for your reply. Though, I am not sure if you understood my problem. Generating the URL isn't the problem, but implementing it in the E-Mail. As you said I am formatting the company name with JS.

 

Or did I get you wrong?

0 Upvotes
MikeCormack
Top Contributor

Send JS generated URL per E-Mail

SOLVE

I am perhaps misunderstanding the question.

 

The html I sent would go into the source code of a rich text in an email to produce a link that drops the querystring with the company name added via the personalisation field {{ contact.company_name }} or whatever ythe field is called.

 

Nikboe
Solution
Participant

Send JS generated URL per E-Mail

SOLVE

Thanks for your answer!

 

I solved the problem:

 

1) Create a hidden field in the form

2) Use script to populate the form before sending it: $form.find('input[name="affiliate_id"]').val(affiliateID).change();

 

affiliate_id is the form field, affiliateID ist my variable.

0 Upvotes