Skip to content
This repository was archived by the owner on Nov 18, 2023. It is now read-only.

kacperduras/pixelconversionserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pixelconversionserver Build Status

The external server for Facebook Pixel tracking in Elixir.

How to run

$ mix escript.build
$ ./pixelconversionserver

or

$ mix run --no-halt

Please, for production use, set MIX_ENV to prod.

Available environment settings

  • APP_PORT: HTTP port (default: 4000)
  • ROLLBAR_TOKEN: access token for Rollbar
  • PIXEL_ID: id of Facebook Pixel
  • ACCESS_TOKEN: access token for Facebook Pixel
  • TEST_EVENT_CODE: test code for Facebook Pixel (optional)

How to use

Request

curl -X POST \
  -F 'data=[
       {
         "event_name": "PageView",
         "event_time": 0000000000,
         "user_data": {
           "em": "sample"
         }
       }
     ]' \
  http://localhost:4000/track

Documentation for request body is available here: only data field.

Good response

{
  "status": "ok",
  "processed": 1
}

Bad response

{
  "error": true,
  "code": 500,
  "body": { /* optional exception content */ }
}

License

MIT

About

The external server for Facebook Pixel tracking in Elixir.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages