Default URL tracking to 'yes'

Spiro

Member
I'm sure this is very easy, i just cannot find where to set it.

Can you set the Url tracking for a campaign to default to 'yes' rather than no?
 
Unfortunately there's no easy way to do it... however, you can copy a older campaign that has this setting to Yes and then edit it.
 
yeah.

Now you need to clear Cache from folders.

Then clear browser cache and then login.

Surely then it works.
 
I'm bringing this up as id also like to somehow have the URL Tracking marked as Yes by default when creating campaigns.

I went to the campaign_option table but that only seems to be for existing campaigns, how do i go about hard-coding it so the field is selected to Yes instead of No? I know how to do this as its very simple in HTML but not sure what file i need to edit in order to do it?

It would simply be this:

HTML:
<label for="CampaignOption_url_tracking" class="required">Url tracking <span class="required">*</span></label>                                            <select data-title="Url tracking" data-container="body" data-toggle="popover" data-content="Whether to enable url tracking" class="form-control has-help-text" placeholder="Url tracking" data-placement="top" name="CampaignOption[url_tracking]" id="CampaignOption_url_tracking">
<option value="yes">Yes</option>
<option value="no" selected="selected">No</option>
</select>

Replaced with this:

HTML:
<label for="CampaignOption_url_tracking" class="required">Url tracking <span class="required">*</span></label>                                            <select data-title="Url tracking" data-container="body" data-toggle="popover" data-content="Whether to enable url tracking" class="form-control has-help-text" placeholder="Url tracking" data-placement="top" name="CampaignOption[url_tracking]" id="CampaignOption_url_tracking">
<option value="yes" selected="selected">Yes</option>
<option value="no">No</option>
</select>
 
After searching all the MailWizz files in SSH i give up trying to do this myself as im going round in circles here thanks to your amazing coding skills Serban.

Ok so i got to find the page that displays the HTML which is /apps/customer/views/campaigns/step-setup.php

After going through the code on that page i then needed to search for files containing "public function getYesNoOptionsArray" which displayed only 1 file which is /apps/common/models/CampaignOption.php

After searching that file i get to this bit of code

PHP:
public function getYesNoOptionsArray()
    {
        return $this->getYesNoOptions();
    }

This is where i get confused and lost and ended up giving up, probably because im tired since its 4am here in the UK. I've tried searching for the Open Tracking variable as that is selected as Yes when making new campaigns, so there must be a way of doing the exact same thing for URL Tracking?
 
@sendmedialtd - you just have to run this sql query:
Code:
ALTER TABLE `mw_campaign_option` CHANGE `url_tracking` `url_tracking` ENUM('yes','no') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'yes';
Then empty the app cache, that is, rename the apps/common/runtime/cache folder.

That's all you have to do.
Anyway, by popular demand, i changed this to be enabled by default from the upcoming release.
 
Back
Top