swag-for-dev icon indicating copy to clipboard operation
swag-for-dev copied to clipboard

Add UTM Referral links to swag

Open vikaspotluri123 opened this issue 6 years ago • 11 comments

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

vikaspotluri123 avatar Dec 07 '18 01:12 vikaspotluri123

@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?

SemperDisco avatar Dec 10 '18 18:12 SemperDisco

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

vikaspotluri123 avatar Dec 10 '18 19:12 vikaspotluri123

What parameters should be added to the url?

SemperDisco avatar Dec 10 '18 19:12 SemperDisco

utm_source, utm_campaign, utm_medium iirc

vikaspotluri123 avatar Dec 11 '18 05:12 vikaspotluri123

utm_source, utm_campaign, utm_medium

Do you also know which values they should have?

SemperDisco avatar Dec 11 '18 12:12 SemperDisco

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

vikaspotluri123 avatar Dec 11 '18 12:12 vikaspotluri123

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

aslafy-z avatar Sep 29 '19 15:09 aslafy-z

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

THE-VR7 avatar May 13 '20 19:05 THE-VR7

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

vikaspotluri123 avatar May 13 '20 22:05 vikaspotluri123

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

varunseth578 avatar Mar 12 '23 17:03 varunseth578

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

shubhamkapoor01 avatar May 02 '23 19:05 shubhamkapoor01