I'm wondering if anyone has any idea if and how I could use dynamic URL values (such as a tracking parameter) in a promotional rule condition? I've been browsing for an extension but no luck so far.

I'm running Magento Enterprise

Example: I have an e-mail campaign for product X and would like to give only people who arrive to the site via e-mail a 20% discount. I have CEX tracking parameter for each e-mail campaign and it's unique.

Is there an extension or some way how I could add CEX = xyz as a promotion rule condition?

I initially thought that's what Magento Enterprise OOTB "URL key contains" condition would do, but then realized it only reads the actual product URL key stored in Magento.


2 Answers 2


May be you can just pass the coupon as an url parameter and then auto apply it?

It's the same level of security. Anyone can share link from the email, so any person can use it, not only the email receiver.

  • Hey, are you reffering to this type of auto-applying coupons: drewgillson.com/blog/… ? This would actually solve the problem nicley as I can separate different campaigns and add sources according to coupon codes and apply it fairly easily to promotions. I'll give it a test. Thanks!
    – CrtP
    Commented Aug 8, 2014 at 13:55
  • I'm glad to be of service. Accept the answer if it helps.
    – Amasty
    Commented Aug 8, 2014 at 13:59

You can create a module to get the parameter from the URL and apply a coupon code/discount rule programatically. Here you have a guide.

Another wy is to save the code from the url in session/cookies and use an observer to apply the discount once in checkout. This is explained here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.