Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send UTM params #58

Closed
aaronklaassen opened this issue Apr 5, 2017 · 4 comments
Closed

Send UTM params #58

aaronklaassen opened this issue Apr 5, 2017 · 4 comments
Assignees

Comments

@aaronklaassen
Copy link
Member

aaronklaassen commented Apr 5, 2017

@lukechesser @HughbertD

These days the API terms have this requirement: https://community.unsplash.com/developersblog/unsplash-api-terms-explained#block-yui_3_17_2_1_1490972762425_202608

But without being able to send arbitrary query params via the lib, clients can't do that. Since it should be attached to every request anyway, maybe the best way to do this is to make the utm_source value part of the lib config, and everything just gets attached automatically. i.e.,

Crew\Unsplash\HttpClient::init([
	'applicationId'	=> 'YOUR APPLICATION ID',
        'secret'        => 'YOUR APPLICATION SECRET',
	'callbackUrl'	=> 'https://your-application.com/oauth/callback',
        'utmSource'     => 'my sweet app'
]);

or whatever.

For backwards compatibility, I'd log a warning if that value is missing from the config, but not fail outright.

@HughbertD
Copy link
Collaborator

@aaronklaassen If the user hasn't given their utmSource, do you want the links to either fall to a default and generate something like:
?utm_source=nottracked&utm_medium=referral&utm_campaign=api-credit

Or skip adding UTM parameters entirely? Wondering if some data is better than none.

@aaronklaassen
Copy link
Member Author

@HughbertD Good question. I'll get back to you.

@aaronklaassen
Copy link
Member Author

@HughbertD Yeah put a placeholder value in - api_app works.

@lukechesser
Copy link
Member

@aaronklaassen good thinking on this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants