Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Romand 14 posts 154 karma points
    Dec 14, 2016 @ 14:27
    Romand
    0

    Custom Unsubscribe doesn't reflect in Analytics

    I want my user to unsubscribe from my newsletter. Subscribers are given by a dynamic Subscription Provider. The unsubscription link is being instanciated in a render task (method ProcessUniqueItem).

    I get a correct link;

    In my form I end up calling

    TrackingService trackingService = new TrackingService((ITrackingItemRepository)new TrackingItemRepository());
    var unsubscriptionResult = trackingService.Unsubscribe(_email, newsletter.SubscriptionAlias);
    

    Which returns true. The call is delegated to the method public override bool Unsubscribe(string email, string listItemId) which performs correct actions.

    But in the analytics I got nothing rendered as showing this result. Is it normal ?

    From the decompiled, I end up figuring out that Analytics may need a new tracking item of type CLICK with URL containing tracking/unubscribe.aspx to be taken into account.

    Can you advise correct way to have analytics show the unsubscription. Thanks in advance,

  • Romand 14 posts 154 karma points
    Dec 15, 2016 @ 08:21
    Romand
    100

    I finally made it work by adding few Tracking Items as such

    TrackingService trackingService = new TrackingService((ITrackingItemRepository)new TrackingItemRepository());                                    
    trackingService.Unsubscribe(_email, newsletter.SubscriptionAlias);
    trackingService.AddTrackingItem(newsletter.Id, _email, TrackingType.Click, "");
    trackingService.AddTrackingItem(newsletter.Id, _email, TrackingType.Click, "unsubscribe.aspx");
    
  • Markus Johansson 1945 posts 5898 karma points MVP 2x c-trib
    Dec 15, 2016 @ 08:42
    Markus Johansson
    0

    Hi!

    Sorry for taking some time. That's true, when a user click the unsubscribe-link the package will add a tracking item.

    Your way of doing this is how it's done in the core. We are planning to create a better API in upcomming released and it might be a good idea to add a tracking item when someone unsubscribe a user with a specfic newsletter id provided.

    Thanks for sharing your solution.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies