zumba/amplitude-php

Api for Europe

joaquin-minderest opened this issue · 2 comments

Hi,
first of all thank you for your work.

I use API for Europe ( https://api.eu.amplitude.com/2/httpapi ). According to [https://developers.amplitude.com/docs/http-api-v2].

Can I set this endpoint for API calls?

Thanks

jonyo commented

There is not a way to change it with a config, at the moment you would need to change it in the source code directly:

const AMPLITUDE_API_URL = 'https://api.amplitude.com/httpapi';

Which is not ideal, you don't want to be editing the source code on a library (unless you are making a PR to change the library). Currently that is the only way using this library though, it would require code changes to do something like set which API URL to use with a config option or something. Or you could fork the library and make that change.

Add parameter in init and constructor in this PR #36