I am trying to follow this blog post. https://snowplowanalytics.com/blog/2016/03/07/ad-impression-and-click-tracking-with-snowplow/ It is pretty old but hopefully still relevant?
Version of the collector
snowplow_scala_stream_collector_google_pubsub
1.0.0
❯ curl -sv http://localhost:9001/r/tp2?u=http%3A%2F%2Fexample.com
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 9001 (#0)
> GET /r/tp2?u=http%3A%2F%2Fexample.com HTTP/1.1
> Host: localhost:9001
> User-Agent: curl/7.64.1
> Accept: */*
>
< HTTP/1.1 400 Bad Request
< Set-Cookie: sp_dp=bc7d8167-164c-4e68-9304-0ea00f27705d; Expires=Fri, 30 Jul 2021 00:00:29 GMT; Path=/; HttpOnly; SameSite=Strict
< Cache-Control: no-cache, no-store, must-revalidate
< P3P: policyref="/w3c/p3p.xml", CP="NOI DSP COR NID PSA OUR IND COM NAV STA"
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Credentials: true
< Server: akka-http/10.1.10
< Date: Thu, 30 Jul 2020 00:00:29 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact
* Closing connection 0
Config
collector {
interface = "0.0.0.0"
port = 9001
port = ${?HTTP_PORT} # set http port, or fallback to 9000
paths {}
p3p {
policyRef = "/w3c/p3p.xml"
CP = "NOI DSP COR NID PSA OUR IND COM NAV STA"
}
doNotTrackCookie {
enabled = true
name = "DP_DO_NOT_TRACK"
value = "TRUE"
}
cookie {
enabled = true
expiration = "365 days"
name = "sp_dp"
httpOnly = true
sameSite = "Strict"
secure = false
secure = ${?COOKIE_SECURE} # set to true for secure cookies
}
# cookie bounce does not work well with python tracker
cookieBounce {
enabled = false
name = "n3pc"
fallbackNetworkUserId = "00000000-0000-4000-A000-000000000000"
}
redirectMacro {
enabled = false
}
rootResponse {
enabled = false
statusCode = 200
}
enableDefaultRedirect = true
crossDomain {
enabled = false
domains = [ "*" ]
secure = true
}
cors {
accessControlMaxAge = "7d"
}
prometheusMetrics {
enabled = true
}
streams {
good = "dp-<REDACT>"
bad = "dp-<REDACT>"
useIpAddressAsPartitionKey = true
sink {
enabled = "google-pub-sub"
googleProjectId = ${GOOGLE_CLOUD_PROJECT}
backoffPolicy {
minBackoff = 100
maxBackoff = 1000
totalBackoff = 10000
multiplier = 1.3
}
}
buffer {
byteLimit = 100000
recordLimit = 1000
timeLimit = 360
}
}
}
akka {
loglevel = DEBUG
loggers = ["akka.event.slf4j.Slf4jLogger"]
}
I am able to track events as long as POST
them to the collector, but I cannot get any of the GET
endpoints to work. So I cannot get this to work, and I cannot get the webhooks to work.