Result_url and Result_title variables in Events tracking not returning variables

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Result_url and Result_title variables in Events tracking not returning variables

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 1 year, 11 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #32797
    JJRey16
    JJRey16
    Participant

    Hi,
    I have activated several of the options in the Google Analytics events tracking successfully. However, I am having problems with Results click event tracking.

    I have used {result_url} and {result_title} for Event action and Event Label respectively. In the Analytics admin, Event Action literally returns {result_url}. Event Label returns “not set”. Am I missing something? The variables {search_name} and {phrase} are working just fine.

    I bought another license that has up-to-date support: 049e146f-2f54-4634-abae-3c16029755da

    URL in question and admin credentials provided.

    Thanks!!

    #32806
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for the details, it helps us a lot!

    The problem is the customization on the results. The plugin detects the title by looking for an anchor link with the “asp_res_url” class. That is however missing in your case, it was probably removed via the customization.
    Make sure to add the “asp_res_url” class to the “entry-title-link” anchor, and it should start working again: https://i.imgur.com/iiRJXDI.png

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #32858
    JJRey16
    JJRey16
    Participant

    Thanks that was very helpful. Currently I changed other anchor links as well with the same piece of code (outside of AJAX pro search, like my blog list).

    Would having asp_res_url on these anchors include them in the AJAX analytics? As far as I can tell, asp_res_url doesn’t add any styling.

    Just wondering if I need to update some of my customization to specifically add asp_res_url to only the ASP results, so clicks on blog page for example don’t show as ASP results.

    Thanks!

    #32860
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    You are welcome!

    That only affects the live results list nothing else, you don’t need to add them anywhere else. You can if you want to, but it will not affect the analytics, as it is restricted to elements within that container.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #33039
    JJRey16
    JJRey16
    Participant

    Hi Ernest,
    The change you mentioned worked for {result_title}. I am now seeing the result title come through on Google Analytics Event Label. The Event Action however is still showing “{result_url}”. Thoughts? Here is the search in question: https://employersforumindiana.org/resources/

    Thanks!

    #33054
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    I don’t know unfortunately. The event handler seems to be attached, the class is there, the code on the plugin side is fine as well. Everything seems to be in place. The same exact code is parsing the label, so even that is all right, the element is found as well.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.