Gravatar for wvuong@captechconsulting.com

Question by wvuong, Feb 8, 2016 4:19 PM

Usage Analytics Token Missing Permissions

I currently have a pro license that allows analytics and am able to save analytics fine, but when trying to use the AnalyticsSuggestions component i get the following response

{
  "message": "The provided token does not have permission 'QUERY_SUGGEST'.",
  "type": "Permission"
}

and when trying to use the usage analytics api i get the following

{
  "message": "The provided token does not have permission 'VIEW ANALYTICS_DATA'.",
  "type": "Permission"
}

Is this something we need to enable on our side?

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Feb 8, 2016 5:00 PM

Did you enter your Coveo Usage Analytics data token in the component you are trying to integrate the AnalyticsSuggestions component to?

I suppose you are trying to integrate the AnalyticsSuggestions component to a standalone search box (Coveo Search Box sublayout/rendering) in the header of your website.

  1. Open the Coveo Search Box component properties in Presentation > Details dialog.
  2. Scroll to the Analytics section
  3. Check the "Enable Coveo Usage Analytics" checkbox
  4. Enter your data token in the next field
  5. Save
  6. Publish
Gravatar for wvuong@captechconsulting.com

Comment by wvuong, Feb 8, 2016 8:45 PM

I'm using this with a normal searchbox + results. I have enabled the analytics component in the rendering parameters. I have confirmed on the published site that the toke and component exists. The token is being sent correctly during the request.

Gravatar for wvuong@captechconsulting.com

Comment by wvuong, Feb 8, 2016 8:47 PM

The query looks like this:

https://usageanalytics.coveo.com/rest/v14/stats/topQueries?accesstoken=434…yText=a&callback=jQuery1910390371517976745961454982426315&_=1454982426317

Ask a question