Workaround for Iglu Webhook in AppsFlyer: schema cannot contain special characters

Hi!

I’m trying to create a postback in AppsFlyer with the following URL

[COLLECTOR]/com.snowplowanalytics.iglu/v1

and the following custom parameter

key: "schema", value: "iglu%3Acom.appsflyer%2Finstall%2Fjsonschema%2F1-0-0"

but it says “cannot contain special characters”.

I tried converting it to base64

key: "schema", value: "aWdsdTpjb20uYXBwc2ZseWVyL2luc3RhbGwvanNvbnNjaGVtYS8xLTAtMA%3D%3D"

but it contains special characters too, and more importantly, it doesn’t seem to be decoded by snowplow. I don’t see any com.appsflyer in the logs when I call the URL with the schema in base64.

Do you have any idea how I could work around that issue?

I guess I’m not the first one to create a postback in AppsFlyer. Could anyone share their solution?

Edit: I’m thinking about making a reverse proxy between AppsFlyer and Snowplow to append &schema=iglu%3Acom.appsflyer%2Finstall%2Fjsonschema%2F1-0-0 to the URL. I also contacted AppsFlyer in case they have a solution.

@guillaume , how does the final payload generated by AppsFlyer look like? You can send the data to Iglu webhook via either POST or GET request (and their variation depending on the requirements). Also, you need to check how AppsFlyer handles the encoding to compose the URL correctly. Perhaps, you do not need to encode the schema value manually at all.

Moreover, as Iglu Central does not host any JSON schema for AppsFlyer events (they vary depending on the AppsFlyer attribution setup), you need to make sure you host those in you custom Iglu server.

I believe this AppsFlyer doc could help you futher: https://support.appsflyer.com/hc/en-us/articles/207034356.

Hi @ihor, yes that’s what I’m doing, AppsFlyer sends the data to a Iglu webhook via a GET. The problem is that I can’t set the schema iglu:com.appsflyer/install/... because of the special characters (encoded or not, both have special characters, i.e. : and /, or %). The form in AppsFlyer’s postback management page doesn’t accept any special characters.

But I solved the issue with a reverse proxy in AWS Lambda that forwards the query string parameters from AppsFlyer to my collector. Here is a basic view of how it works:

[AppsFlyer] — send GET to URL1 —> [AWS Lambda] — send GET to URL2 —> [Snowplow Collector]

where

URL1 = myAwsLambdaFunction.com?app_name=xxx&ios_version=yyy&install_time=zzz&etc

and

URL2 = myCollector.com/com.snowplowanalytics.iglu/v1?schema=iglu%3Acom.appsflyer%2Finstall%2Fjsonschema%2F1-0-0&app_name=xxx&ios_version=yyy&install_time=zzz&etc

A bit overkill and costly but I contacted AppsFlyers and they didn’t offer me any solution.

Thanks for sharing.

1 Like

Thanks - this is good to know. I’m not too sure how else we could provide a solution for this beyond doing something like supporting a new parameter that allows sending a base64 encoded schema or something similar. Open to any other ideas as well though.

1 Like