# Swiftype Clickthrough Tracking for Analytics

**URL:** <https://discuss.elastic.co/t/swiftype-clickthrough-tracking-for-analytics/267580>\
**Category:** Elastic Search\
**Tags:** elastic-site-search\
**Created:** [March 17, 2021, 9:44pm UTC](https://discuss.elastic.co/t/swiftype-clickthrough-tracking-for-analytics/267580 "2021-03-17T21:44:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sleblang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sleblang/32/85719_2.png) [@sleblang](https://discuss.elastic.co/u/sleblang)\
**Post date:** [March 17, 2021, 9:44pm UTC](https://discuss.elastic.co/t/swiftype-clickthrough-tracking-for-analytics/267580/1 "2021-03-17T21:44:10Z")

</div>

We are using the crawler based option and am trying to determine how to track clicks on individual search results. I found the following two options:

- [Analytics | Swiftype Documentation](https://swiftype.com/documentation/site-search/analytics#recording_clickthroughs)
- [Clickthrough | Swiftype Documentation](https://swiftype.com/documentation/app-search/api/clickthrough#clickthrough)

I am assuming that we should be using the first link. However, the API endpoint listed in the first link, "[https://api.swiftype.com/api/v1/public/analytics/pc.json](https://api.swiftype.com/api/v1/public/analytics/pc.json)", does not seem to be responsive. I do not get an error in the console and under Network \> Timing it simply lists "Stalled". Pasting the url in the browser brings up a generic error that "The page isn't working".

I tried logging a page click using curl rather than Javascript GET request (Axios) and the curl request was successful in showing up in our Analytics dashboard the following day for the page I clicked.

I also tried using the reference in this post, [laravel - Send object with axios get request - Stack Overflow](https://stackoverflow.com/questions/46404051/send-object-with-axios-get-request), and it did not work either.

I tried using a curl to fetch converter, using the following:

```auto
fetch('https://api.swiftype.com/api/v1/public/analytics/pc.json', {   
    method: 'POST',
    headers: {
    'Content-Type': 'application/json'
    },
    body: JSON.stringify({ "engine_key": "our_engine_key", "doc_id": "60127004e7b9d2627bb0930f", "q": "engineering" })
    });

```

Unfortunately, this did not work either.

Looking for clarification on this issue.

Thanks, in advance.

---

<div class="post-metadata">

**Author:** ![Sean\_Story](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sean_story/32/69987_2.png) [@Sean\_Story](https://discuss.elastic.co/u/Sean_Story)\
**Post date:** [March 18, 2021, 6:24pm UTC](https://discuss.elastic.co/t/swiftype-clickthrough-tracking-for-analytics/267580/2 "2021-03-18T18:24:17Z")

</div>

Hi @sleblang,

Can you "copy as cURL" the request from the network tab of your dev tools, and compare with the curl command you used that worked? Perhaps your javascript approach had a typo in the endpoint or payload?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 15, 2021, 6:24pm UTC](https://discuss.elastic.co/t/swiftype-clickthrough-tracking-for-analytics/267580/3 "2021-04-15T18:24:46Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
