Note! You are looking at documentation for an old version of the package. Go here for the latest documentation.

The click tracking in Newsletter Studio v2 is flexible and will redirect to any link added by the editor. However, sometimes this behavior is not wanted and you can take control of this process by implementing a handler for the "NewsletterStudio.App_Plugins.NewsletterStudio.Pages.Tracking.TrackClick.ProcessClick"-event.

 

Here are some examples:

using NewsletterStudio.App_Plugins.NewsletterStudio.Pages.Tracking;

public class NewsletterTrackingBlockApplicationEventHandler : ApplicationEventHandler
{
    protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
    {
        TrackClick.ProcessClick += delegate (object sender, TrackClickEventArgs args)
        {
            if (!args.Parameters.Uri.Host.Contains("newsletterstudio.org"))
                args.BlockRedirect = true;

            // or

            if (!args.Parameters.Uri.Host.Contains("newsletterstudio.org"))
                args.RedirectTo = "/";

        };
    }
}

 Please note that this feature was added in Newsletter Studio v2.1.10

 




More articles on "Common problems"

I get an error, what is wrong?

Newsletter Studio works with all versions Umbraco higher than 4.7+ this means that things sometimes can go wrong.Most of the time problems are related to upgrades or changes in the Umbraco core.When trying to find out what's wrong there are some great steps to follow to try to find out what's wrong.…

Read article

What does all the statuses mean?

Many of the rows in the Newsletter Studio db has statuses that are stored as numbers (ints). Here is a list of the different statuses and what they mean:ns_Newsletter statuses:Created = 0Paused = 1InProgress = 2Error = 3 Completed = 4ns_EmailTrackingItems statues:Ready = 0InProgress = 1Error = 2…

Read article