Having difficulty using variable data in Google Analytics

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Having difficulty using variable data in Google Analytics

This topic contains 8 replies, has 2 voices, and was last updated by thesmsworks thesmsworks 1 year, 4 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #41372
    thesmsworks
    thesmsworks
    Participant

    I have Events Tracking enabled on my site. The attached screenshot shows that the event label for the ‘Live search end event tracking’ is ‘{phrase} | {results_count}’.

    I have registered two custom dimensions in Google Analytics 4; one each for {phrase} and {results_count}.

    If the event label above is passing these two dimensions in one label, with a pipe delimiter, does that mean I will not be able to use them independently to build reports in GA4? I want to build a report that shows the number of results for each search phrase.

    Attachments:
    You must be logged in to view attached files.
    #41387
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    I am not yet that familiar with the overall capabilities of GA4 reports, but there is probably a way to do it.

    You could perhaps assign the “Event category” the {phrase} variable and the “Event Label” or “Event value” the {results_count}, that way you will have only a single information per attribute for each event, so you should be able to use both independently.

    Best,
    Ernest Marcinko

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


    #41399
    thesmsworks
    thesmsworks
    Participant

    Hi Ernest,

    I think we’re on the right track now. Thank you very much for your help.

    Regards, Phil

    #41404
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


    #41494
    thesmsworks
    thesmsworks
    Participant

    Hi again Ernest,

    We can see search_end events recorded on our GA4 property, but the variable information does not seem to be there. I notice from the GA documentation that everything is an event these days, so the event category, label etc no longer apply. How is the data being submitted to GA by the plugin?

    Regards, Phil

    #41495
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Phil,

    The values are the actual variable values. The event category, label etc.. are only attributes for the event objects. It worked similarly in GA3, but these were standardized attribute names, with GA4 it is not that strict anymore. We decided to keep them for now, as it can still work with GA3, and for GA4 it does not matter what the attribute name is. In a future update once GA3 is out of the way, we will rework that interface to add as many event attributes as you want.
    For example in our demo setup with the default configuration when I check the “search_end” event, I can see these attributes. Among them there is the event_category, event_label etc.. If you check the event_label attribute, you can see the attribute values sent by each event.

    Best,
    Ernest Marcinko

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


    #41520
    thesmsworks
    thesmsworks
    Participant

    Hi Ernest,

    Sorry to bother you again.

    I’ve registered event_label as a custom dimension in GA4, and I’ve assigned the {phrase} variable to that in the configuration for Search End Event Tracking. I can now see a list of the search phrases used in a custom report that we’ve built in GA4, which is great.

    In the same configuration for Search End Event Tracking I’ve assigned {results_count} to the event_value field. This data is not being captured in GA4 for the event, however. I can see from the guidance that {results_count} is not actually a usable value in Search End Event Tracking, and in fact it’s not listed as a usable value in any of the configurable events in ASP, as far as I can see, although it is listed in the documentation as a valid paramter.

    I can’t quite figure out what I’m going wrong. Can you help please?

    Regards, Phil

    #41521
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Phil,

    It is only missing from the label description on the back-end. The variable does exist, it is available for the live search end event (for other events the number is not yet known). This only works for live searches which does not involve results/archive/elementor page live filtering – only for the plugin results container.
    I just checked, and it seems to work okay too, we use the default configuration, as the event label {phrase} | {results_count} and when I check the labels for the search_end events, I see the values: https://i.imgur.com/e3setlH.png

    Best,
    Ernest Marcinko

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


    #41525
    thesmsworks
    thesmsworks
    Participant

    I think that get us what we need. Thanks again.

    Phil

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

You must be logged in to reply to this topic.