Post to has status pending

POST to has status (pending)

Should the Contnet-Type be application/json?
If so, how is it set?

!(function(e, a, t, n, s, i, c) {
        (e.AlgoliaAnalyticsObject = s),
          (e.aa =
            e.aa ||
            function() {
              (e.aa.queue = e.aa.queue || []).push(arguments);
          (i = a.createElement(t)),
          (c = a.getElementsByTagName(t)[0]),
          (i.async = 1),
          (i.src = ""),
          c.parentNode.insertBefore(i, c);
      })(window, document, "script", 0, "aa");

      // Initialize Insights library
      aa("init", {
        appId: "XXXXXXXXX",
        apiKey: "ZZZZZZZZZ"

      // To send a click event
      aa("clickedObjectIDsAfterSearch", {
        eventName: "product_clicked",
        index: algoliaIndex,
        queryID: suggestion._queryID,
        objectIDs: [suggestion.objectID],
        positions: [suggestion._position]

I moved some js code to the head of the page and it started working correctly

Hi @ajmercer. Glad you figured this out. Do not hesitate to share your code with us if you think it can help someone else.