How do I Pass the Referral URL to my Integration?

MailMunch automatically stores the referrer url for your subscribers and also shows them in the subscriber view. However, if you want this referrer url to be passed on to your preferred Email Marketing Solution (e.g. MailChimp, ConstantContact, etc.), you'll have to follow the simple steps below to implement the additional functionality.

  • Access your MailMunch account and Edit the form that you want to setup for this purpose.


  • In the Fields step, add a Hidden field.


  • Make sure your enter "referrer" as shown in the screenshot below in the hidden field "VALUE". You can name the hidden field whatever you want.


  • Go to the "Behavior" step. Expand the "Tracking Pixels" section and in the "VIEW PIXELS" field, copy and paste the following code:

    <script>jQuery("iframe[class^=mailmunch]").each(function(e,n){var i=jQuery(n).contents(),a=i.find('.hidden-field-container input[value="referrer"]');if(a.length>0){var r=jQuery(a).attr("name").match(/\d+/)[0];i.find("#custom_field_hidden_field_"+r).val(window.location.href)}});</script>


  • Now, click on the "Integrate" step and map the hidden field with your EMS's list field.


  • Click on Save and Continue and Publish the form.


That's it. All future subscribers subscribing from this form will have their referrer url populated properly in your EMS.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.