1

I'm trying to enable page visits and components visits tracking using WAI. We are using web 8.1 and DD4T. Enabling profiling using cd_WAI_Config i can see users table is getting updated and also I can able to increment the trading keys and Timeframe table is also getting updated.

But unfortunately there are no entries in page_visits and Component_visits even though for both tracking in enable in cd_wai_config.

I tried to invoke tracking using code as follows:

TrackDispatcher td = new TrackDispatcher(waiPage);
td.Track(waiPage);

still results are same and i don't see entries in page_Visits and Component_Visits. Do i need to add Activate Tracking tbb in all pages? Also, as we are using DD4T templating, i believe Activate Tracking won't work with DD4T templating.

Please suggest how i Can enable tracking for page and component visits in DD4T.

1 Answer 1

2

This functionality works on the Sdl Web's Category/keywords. you need to add the "Activate tracking" tbb in the Page template, and add the category for tracking in CT's Tracked Category.

check my answer on this post for code snippet: How to use Tracking Key in DD4T application

try following:

TrackingKeys trackingKey = new TrackingKeys(waiPage);

i hope you are doing increment over your keyword which you selected in TargetGroup

3
  • Hi Raj, Thank you for your response. yes I have followed as suggested in your answer and I can able to increment the tracking keys. But I don't see any entry in page_visits and component_visits tables.
    – Rajesh G
    Commented Jun 27, 2017 at 9:37
  • share your code snippet which you are using in DD4T app
    – Raj Kumar
    Commented Jun 27, 2017 at 12:55
  • Hi Raj, Please find below: var waiPage = new Tridion.ContentDelivery.Web.WAI.WAIPage(Page.Id, Context.ApplicationInstance.Context); Tridion.ContentDelivery.Web.WAI.TrackingKeys trackingKey = new Tridion.ContentDelivery.Web.WAI.TrackingKeys(waiPage.User); trackingKey.IncrementKey("MyKey"); trackingKey.ExecuteUpdate();
    – Rajesh G
    Commented Jun 27, 2017 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.