electerious / ackee-tracker

Transfer data to Ackee.
MIT License
196 stars 22 forks source link

Tracking POST calls get 200 response from server but nothing is stored #47

Closed stoilsky closed 9 months ago

stoilsky commented 9 months ago

I need some help with debugging.

Server is running on Netlify + MongoDB Atlas

When testing, I can see the tracking calls going out:

{
  "query":"\n\t\t\tmutation createRecord($domainId: ID!, $input: CreateRecordInput!) {\n\t\t\t\tcreateRecord(domainId: $domainId, input: $input) {\n\t\t\t\t\tpayload {\n\t\t\t\t\t\tid\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t",
  "variables":{
    "domainId":"2a97e286-d2ca-4755-afb6-1addeac283e8",
    "input":{
      "siteLocation":"http://localhost:3000/",
      "siteReferrer":""
    }
  }
}

but nothing is written to the DB. The Netlify log shows /api function is called but doesn't provide any other useful info

API response is:

{
    "data": {
        "createRecord": {
            "payload": {
                "id": "88888888-8888-8888-8888-888888888888"
            }
        }
    }
}

Note:

"domainId":"2a97e286-d2ca-4755-afb6-1addeac283e8" 

is correct. Also i've set

 ignoreLocalhost: false,
stoilsky commented 9 months ago

Update: looks like this is intended and the configuration is working.

I can see "Ackee ignores you because this is your own site" in the console and "88888888-8888-8888-8888-888888888888" is the response when "This is the case when Ackee ignores you because of the ackee_ignore cookie." ...