Tracking clicks on custom URLs

Mayakovskii

Member
Hello, everyone!
I am sure the problem I will describe here already baffled someone before. Sincerely ask you to help

We send lots of data about our clients to Mailwizz's lists a few times daily. Some of this data are links that we add to our emails through custom tags.

The main problem hides in the tracking links. Mailwizz's tracking can't store direct custom links inside the letters. Tracking just redirect to the list's data and gets links from the custom fields at the moment of clicking.

So for now we have 2 poor options to solve this:
- disable tracking clicks (this way all links in the emails will be direct and correct all the time but we will lose statistics)
- send letters with Mailwizz tracking and hope that links will be clicked before the next data update in our lists (naive idea)

Feel free to share any idea about solving that complicated issue. Each opinion is greatly appreciated
Thanks in advance! :)
 
What do you mean with this?
Hello! To understand this more clearly you can run a simple test:

1. add to list a custom field with any link inside
2. create an email template with a tag corresponding to this field
3. send a campaign with tracking
4. click on the test link from your mailbox
5. change the link to another in the MailWizz list
6. click on the same link in the previously sent email

Share your result, please. Did you get a redirect to the second link in step 6?

Here we have a more detailed discussion of this question
 
5. change the link to another in the MailWizz list
6. click on the same link in the previously sent email
I see what you mean now, you expect old links to work even though you have changed them for your new campaign.
Sorry, this isn't going to work for us, the links are dynamic, they will change based on the value you have in your custom field.
My advice is to find a way to keep the links, maybe use custom fields with number suffixes or send the campaigns at a larger interval so you are sure no old clicks will happen.
 
Hello,
I see what you mean now, you expect old links to work even though you have changed them for your new campaign.
Sorry, this isn't going to work for us, the links are dynamic, they will change based on the value you have in your custom field.
My advice is to find a way to keep the links, maybe use custom fields with number suffixes or send the campaigns at a larger interval so you are sure no old clicks will happen.
Hello! :)
Are you sure about that?
I have noticed extremely positive changes over the past few days.

Do the same test again and please confirm that this is not a dream.
 
Are you sure about that?
I don't know what you mean, sorry. It is true that we have implemented the feature where we allow urls in custom fields and we also can parse them into tracking urls, this was one of the huge changes we released in the last couple of days.
 
This feature solved our problem.
Now the email always contains the link that was at the moment of sending, despite the fact that we are constantly updating the fields in the lists.

This is great news. I hope nothing will change in the future.
I don't know what you mean, sorry. It is true that we have implemented the feature where we allow urls in custom fields and we also can parse them into tracking urls, this was one of the huge changes we released in the last couple of days.
 
This is an optimisation we did in our latest release.
If you have 1M subscribers with custom links, there's no point to have 1M different links saved in the database, this just slows things down considerably.
Instead, we only save the tag itself in the database and we report clicks on the tag itself.
The click will work just fine, tracking will work just fine, so there's really no downside to this.
 
This is an optimisation we did in our latest release.
If you have 1M subscribers with custom links, there's no point to have 1M different links saved in the database, this just slows things down considerably.
Instead, we only save the tag itself in the database and we report clicks on the tag itself.
The click will work just fine, tracking will work just fine, so there's really no downside to this.
Hello,
As I wrote earlier, these changes prevent us from showing relevant links to all of our recipients.
Just because we update our lists several times a day and we don't want to send our emails at longer intervals.
In addition, we are still very far from 1 million subscribers. How to keep our links in the database for at least 3-4 days?

Thanks
 
@Mayakovskii - We don't plan on switching out the way this works BUT we can give you the option to opt-in for the old behavior if you want.
If you open the file: /apps/common/components/helpers/CampaignHelper.php between line 357 and 372 you have:
PHP:
/**
                 * Local tag to be transformed
                 *
                 * @since 2.1.4 - the pattern has been changed from  "/^\[([A-Z0-9:_]+)_URL\]$/i" to "^\[(.*)?\]$".
                 * This way, we catch any tag in the href attribute, which might actually contain a URL.
                 * The issue with this approach is that if the TAG value is empty (or not a URL) when the tracking link is clicked,
                 * there will be no place to redirect, so the subscriber will end up on a 404 page.
                 * The advantage is that we don't store a different link for each TAG value, but we store only the tag
                 * itself, and we parse it at redirect time.
                 * The pattern will allow things like: [TAG] but also things like: [TAG_1]/[TAG_2]/[ETC].
                 * Not sure yet if this is a good idea or not, we can limit it to allow only a tag by using: "^\[[^\]]+\]$"
                 */
                if (preg_match('/^\[(.*)?\]$/', $url, $matches)) {
                    $_url = trim((string)$matches[0]);
                    $foundUrls[$_url] = $markup;
                    continue;
                }

As the comment says, you can change the pattern in order to bring back the old behavior, so the code block now becomes:
PHP:
/**
                 * Local tag to be transformed
                 *
                 * @since 2.1.4 - the pattern has been changed from  "/^\[([A-Z0-9:_]+)_URL\]$/i" to "^\[(.*)?\]$".
                 * This way, we catch any tag in the href attribute, which might actually contain a URL.
                 * The issue with this approach is that if the TAG value is empty (or not a URL) when the tracking link is clicked,
                 * there will be no place to redirect, so the subscriber will end up on a 404 page.
                 * The advantage is that we don't store a different link for each TAG value, but we store only the tag
                 * itself, and we parse it at redirect time.
                 * The pattern will allow things like: [TAG] but also things like: [TAG_1]/[TAG_2]/[ETC].
                 * Not sure yet if this is a good idea or not, we can limit it to allow only a tag by using: "^\[[^\]]+\]$"
                 */
                if (preg_match('/^\[([A-Z0-9:_]+)_URL\]$/i', $url, $matches)) {
                    $_url = trim((string)$matches[0]);
                    $foundUrls[$_url] = $markup;
                    continue;
                }
Try this, see how it works for new campaigns, and if all okay for you, we will add an option in the application for this, and we will tell you how to enable it, so that in the next update, your changes will be kept and things will work as you wish.
 
Awesome! :D:cool: Thank you a lot.
This works extremely well.
Please add an option in the application for this. And please explain what we should do next.

Regards
 
Back
Top