swapagarwal / swag-for-dev

😎 swag opportunities for developers
http://devswag.io
Creative Commons Zero v1.0 Universal
4.27k stars 356 forks source link

Add UTM Referral links to swag #207

Open vikaspotluri123 opened 5 years ago

vikaspotluri123 commented 5 years ago

We should add a filter to our build pipeline that adds UTM terms to swag links so sites know devSwag sent the user

SemperDisco commented 5 years ago

@vikaspotluri123 UTM terms are just URL parameters, right? So we have to add something utm_source=devSwag to all the urls. Do I understand that correctly?

Isn't it an idea to add the parameters in the pug template (https://github.com/swapagarwal/swag-for-dev/blob/1ec15b4744fe605e5f5f2dfff9c85647db837666/src/pug/includes/body.pug#L58)? We can just concatenate the parameters to the reference attribute.

If the filter in our build pipeline is the way to go, how would you implement it? Would you create another gulp task that runs over the swagList and mutates the reference to add the parameters, or would you add a new attribute with the UTM?

vikaspotluri123 commented 5 years ago

Isn't it an idea to add the parameters in the pug template

We should try to limit the amount of processing we do in the template; the template's responsible for outputting the data its provided, not necessarily mutating it

If the filter in our build pipeline is the way to go, how would you implement it?

We already do some processing of the data, adding UTM terms to it could be done there.

https://github.com/swapagarwal/swag-for-dev/blob/1ec15b4744fe605e5f5f2dfff9c85647db837666/get-data.js#L3

SemperDisco commented 5 years ago

What parameters should be added to the url?

vikaspotluri123 commented 5 years ago

utm_source, utm_campaign, utm_medium iirc

SemperDisco commented 5 years ago

utm_source, utm_campaign, utm_medium

Do you also know which values they should have?

vikaspotluri123 commented 5 years ago

I'll be able to give you an answer at some point in time, but I'm not entirely sure when! I'm not actively OSSing right now, so this will be added to the backlog

aslafy-z commented 5 years ago

Here is Google help details: https://support.google.com/analytics/answer/1033863?hl=en#parameters

THE-VR7 commented 4 years ago

Hello. I am new and would love to contribute. I would like to fix this issue, if no one is already on it.

vikaspotluri123 commented 4 years ago

@THE-VR7 I've assigned you to this issue 😄

varunseth578 commented 1 year ago

i would like to contribute to this issue. or need any other help.

shubhamkapoor01 commented 1 year ago

Hey, I'm new this looks interesting, would love to contribute to this one :)