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.

Setting userToken & enabling InsightsClient is vague in the documentation

See original GitHub issue

The insights client & setting userToken is very vague in the documentation marked here

You will see it describes:

<ais-instant-search 
  [...] 
  :insights-client="window.aa"
>
  <ais-configure :clickAnalytics="true" />
  <!-- widgets -->
</ais-instant-search>

But you clearly can’t actually use window.aa there because window is not available like that with Vue.

Is there actual documentation on how to do this? When I set it via data object, I get the error:

[InstantSearch.js]: `insightsClient` property has been deprecated. It is still supported in 4.x releases, but not further. It is replaced by the `insights` middleware.

For more information, visit https://www.algolia.com/doc/guides/getting-insights-and-analytics/search-analytics/click-through-and-conversions/how-to/send-click-and-conversion-events-with-instantsearch/js/

I can’t see any documentation on how to set the userToken in Vue InstantSearch either.

Any help appreciated.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Haroenvcommented, Feb 10, 2021

Ah, I think I see it! userToken in your case is a number, but the insights api only accepts strings: https://www.algolia.com/doc/api-reference/api-parameters/userToken/#how-to-use

1reaction
jonathan-birdcommented, Feb 10, 2021

I noticed the queryID is in the hits though:

<ais-hits>
    <div slot-scope="{ items, insights }">
        <div v-for="item in items">
            {{ item.__queryID}}
        </div>
    </div>
</ais-hits>

This does return the QueryID.

FYI I haven’t setup any custom insight events. The insight events that fire are automatic “Hit” ones.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Generating userToken | Algolia
Generate pseudonymous or anonymous user tokens for all events.
Read more >
Allowing applications to create user tokens
User tokens can be used to impersonate user in Crowd web application if Crowd application has similar directory setup. For this reason, it...
Read more >
Create user token - Product documentation - NetApp
A user token is more commonly used for customer automation than the service token. There are two workflows available to create a user...
Read more >
Generating a qlogin User Token File
To enable authentication you must set the Enable3rdPartyJobsFromQCommand global parameter to 1. The default value is 0, which means there is no ...
Read more >
User access tokens - Hugging Face
and get access to the augmented documentation experience ... You can manage your access tokens in your settings. Access tokens allow applications and ......
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