Problem/Motivation

After connecting Drupal with SearchStax and creating multiple languages, the analytics click data doesn't reflect for those individual languages.

This happens because the "language" parameter isn't being sent in the track/ request payload when the event is "_searchclick", which is required to correctly target a specific language to store analytics data.

Steps to reproduce

  1. Create a Drupal app and connect to a SearchStax app with the ability to create more than 1 language.
  2. Install and enable the SearchStax module on Drupal.
  3. On SearchStax, create a new language.
  4. On Drupal, under Configuration > Search and metadata > SearchStax settings, check the boxes which say "Re-route searches through SearchStudio" and "Configure searches via SearchStudio".
  5. Create a Search view and populate content for testing for multiple languages.
  6. Perform a test search for a specific language, click on a result, and note the track/ API request payload. To decode the payload, you can go to https://www.base64decode.org/
  7. You should see that the "language" param isn't included in the payload body, which means the analytics data will not get stored and reflected under that particular language on the Site Search dashboard.

Proposed resolution

Pass in the language code value in the "language" param of track/ API request payload for "_searchclick" event as specified in the Analytics REST API doc.

Issue fork searchstax-3577349

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kaunaj created an issue. See original summary.

drunken monkey made their first commit to this issue’s fork.

  • drunken monkey committed f10079d0 on 1.x
    fix: #3577349 Fixed analytics click data not tracked for individual...
drunken monkey’s picture

Status: Active » Needs review

I just merged this MR which should fix the problem. Please test in the dev version of the module.

drunken monkey’s picture

Status: Needs review » Fixed

This has now been confirmed to work as intended and released as part of version 1.10.0.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.