Sitecore Maxmind lookup task

313 views Asked by At

I want Sitecore to only perform a Maxmind lookup after a visitor has matched a certain pattern card. I can see plenty of references to the "DNS lookup task" within the comments of Sitecore.Analytics.Config, but I can't seem to track it down to see if it's possible to mess with it.

Can someone point me in the right direction?

1

There are 1 answers

0
Jens Mikkelsen On BEST ANSWER

As I see it the GeoIPLookup is triggered in the StartTracking pipeline in the UpdateGeoIpData processor. It calls into the lookup provider asynchronious.

So I guess you can replace this processor with your own inheriting from this one, and then add your conditions. In that way you would have something like:

public class UpdateGeoProcessor : UpdateGeoIpData
  {
    public override void Process(StartTrackingArgs args)
    {
      if (true) //Put your condition here
      {
        base.Process(args);
      }
    }
  }

Then in your config file you should have something like this:

  <startTracking>
        <processor type="Sitecore.Analytics.Pipelines.StartTracking.RaiseStartTracking,Sitecore.Analytics" />
        <processor type="Sitecore.Analytics.Pipelines.StartTracking.InitializeTracker,Sitecore.Analytics" />
        <processor type="yyy.UpdateGeoProcessor,yyy" />
        <processor type="Sitecore.Analytics.Pipelines.StartTracking.TrackerInitialized,Sitecore.Analytics" />

As fare as I can see, that should handle it, but I have been unable to test it thouroughly.