Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Content support for UTM tags #6347

merged 3 commits into from Sep 4, 2018


None yet
4 participants
Copy link

kuzmany commented Jul 22, 2018

Please be sure you are submitting this against the staging branch.

Bug fix?
New feature?
Automated tests included?
Related user documentation PR URL
Related developer documentation PR URL
Issues addressed (#s or URLs)
BC breaks?


Added support for UTM tags for dynamic content. The same logic like already merged PR #3891


Steps to test this PR:

  1. Apply PR
  2. Call php app/console doctrine:schema:update -f
  3. Edit dynamic content and add UTM params
  4. Process dynamic content and see if links are converted with UTM tags

@kuzmany kuzmany added Ready To Test and removed WIP labels Jul 22, 2018

@kuzmany kuzmany added this to the 2.14.1 milestone Jul 22, 2018

@npracht npracht self-requested a review Aug 8, 2018

@npracht npracht self-assigned this Aug 8, 2018


npracht approved these changes Aug 8, 2018

Copy link

npracht left a comment

capture d ecran 2018-08-08 a 08 35 25
capture d ecran 2018-08-08 a 08 36 30

it is working properly

Copy link

escopecz left a comment

I noticed a few improvements can be made.

@@ -148,6 +153,11 @@ public static function loadMetadata(ORM\ClassMetadata $metadata)
$builder->createField('utmTags', 'array')

This comment has been minimized.


escopecz Aug 12, 2018


Use \Doctrine\DBAL\Types\Type::JSON_ARRAY instead of PHP serialized array.

<h5><?php echo $view['translator']->trans(''); ?></h5>
foreach ($form['utmTags'] as $i => $utmTag):

This comment has been minimized.


escopecz Aug 12, 2018


Can we remove the $i variable? It's not used anywhere.

public function up(Schema $schema)
$this->addSql("ALTER TABLE {$this->prefix}dynamic_content ADD utm_tags LONGTEXT DEFAULT NULL COMMENT '(DC2Type:array)';");

This comment has been minimized.


escopecz Aug 12, 2018


Let's not forget to change the comment to (DC2Type:json_array)

This comment has been minimized.


kuzmany Aug 14, 2018

Author Contributor

Thanks. Fixed

Copy link

escopecz left a comment

It's working for me. When I add a link to the DWC it will be translated to a trackable link. When I click on the link the UTM params as I configured them are attached to the link URL 👍

@heathdutton heathdutton merged commit 37ffaf4 into mautic:staging Sep 4, 2018

2 checks passed

Scrutinizer Analysis: 5 updated code elements – Tests: passed
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.