Title: Dynamic Parameters
Last modified: August 30, 2016

---

# Dynamic Parameters

 *  Resolved [tdamary](https://wordpress.org/support/users/tdamary/)
 * (@tdamary)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/dynamic-parameters/)
 * Hey,
 * I would like to have dynamic parameters into mailchimp from the url.
    For Example:
   [http://www.mywebsite.com/?ref=homepage&source=facebook](http://www.mywebsite.com/?ref=homepage&source=facebook)
 * Can it be done with MC4WP?
    Thank you, Tal
 * [https://wordpress.org/plugins/mailchimp-for-wp/](https://wordpress.org/plugins/mailchimp-for-wp/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [Harish Chouhan](https://wordpress.org/support/users/hchouhan/)
 * (@hchouhan)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/dynamic-parameters/#post-6776425)
 * Hey Tal,
 * I’m sorry for the long delay. I noticed you have 2 similar tickets. I’ll close
   this one and someone from our team will get back to you with more details on 
   UTM and variables soon and reply to this [https://wordpress.org/support/topic/looking-for-mailchimp-4-wp-expert?replies=2](https://wordpress.org/support/topic/looking-for-mailchimp-4-wp-expert?replies=2)
 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/dynamic-parameters/#post-6776426)
 * Hi Tal,
 * We have a knowledge base article explaining [how to populate form fields with data from the URL](https://mc4wp.com/kb/populate-fields-url-data/),
   that should at least help you set off in the right direction.
 * Basically, it works like this (given your example).
 * To get the **ref** variable, use the following.
 *     ```
       {data key='ref'}
       ```
   
 * If you want to set a default value (in case `ref` isn’t given), add the following.
 *     ```
       {data key='ref' default='Homepage'}
       ```
   
 * Now, to get that into a field you can use the above tag inside the `value="..."`
   attribute of your fields.
 *     ```
       <input type="hidden" name="REFERER" value="{data key='ref' default='Homepage'}
       " />
       ```
   
 * If you want to save that value in MailChimp, make sure the selected list(s) has
   a field matching the name. In this case: “REFERER”.
 * Does that help? If not, let me know please!
 *  Thread Starter [tdamary](https://wordpress.org/support/users/tdamary/)
 * (@tdamary)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/dynamic-parameters/#post-6776431)
 * Hey,
 * That’s working, thank you.
 * Mail chimp is not saving the parameters somehow… but the rest are ok.
 * Thanks.
 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/dynamic-parameters/#post-6776432)
 * If you want to save the values in MailChimp, please make sure that you have a
   list field with the exact same name as the hidden field you added to your form.
 * In the above example, a MailChimp list field named “REFERER” should be created(
   type: text) to make sure MailChimp stores the value.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Dynamic Parameters’ is closed to new replies.

 * ![](https://ps.w.org/mailchimp-for-wp/assets/icon-256x256.png?rev=1224577)
 * [MC4WP: Mailchimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailchimp-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailchimp-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailchimp-for-wp/reviews/)

## Tags

 * [ref](https://wordpress.org/support/topic-tag/ref/)
 * [utm](https://wordpress.org/support/topic-tag/utm/)

 * 4 replies
 * 3 participants
 * Last reply from: [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/dynamic-parameters/#post-6776432)
 * Status: resolved