question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Click Analytics window.aa error

See original GitHub issue

Hi. I’m trying to implement Search and Click Analytics with this tutorial: https://www.algolia.com/doc/tutorials/getting-started/how-to-implement-analytics/#reporting-click-and-conversion-events

I added this to instantsearch:

searchParameters: {
    clickAnalytics: true // adding clickAnalytics true enables queryID
  }

and this:

search.once('render',() => {
    window.aa('initSearch', {
      getQueryID: () => {
        return search.helper.lastResults && search.helper.lastResults._rawResults[0].queryID
      }
    })
  })

I understand i have to create buttons with data-something and global eventlistener to catch data. But i have an error like this:

Uncaught TypeError: window.aa is not a function
    at t.search.once (algolia_search.js:33)
    at t.n (events.js:165)
    at t.n.emit (events.js:78)
    at t.value (InstantSearch.js:335)
    at r.n.emit (events.js:84)
    at algoliasearch.helper.js:1245
    at n (_arrayEach.js:15)
    at r (forEach.js:37)
    at r._dispatchAlgoliaResponse (algoliasearch.helper.js:1238)
    at AlgoliaSearchCore.js:446

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
SchmidtDawidcommented, Mar 8, 2018

Done and it works 😃 Than you very much. I forgot about library 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft Dynamics GP Forum - AA Distribution Query Window ...
I am trying to create a new AA query and after I enter 1 for the begin month and 12 for the end...
Read more >
Error: Before calling any methods on the analytics, you first ...
Error: Before calling any methods on the analytics, you first need to call the 'init' function ... window.aa('clickedObjectIDsAfterSearch', ...
Read more >
How To Fix Common Errors in Event Tracking Data Collection
Learn about the most common issues we see when implementing Google Analytics tracking via GTM. Plus how to resolve each of them.
Read more >
Spying a window name strictly | Blue Prism Product
To capture the error message, a human can click on the message box and with a couple ... Instead I have hundreds of...
Read more >
Ads link to error pages - Analytics Help - Google Support
This feature allows Analytics to track information about clicks on your Google Ads ads by tagging your Google Ads keyword destination URLs with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found