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

[WIP] Feature/add utm parameters #1473

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/javascript/legacy/nonprofits/donate/followup-step.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ function view(state) {
h('a.button--small.facebook.u-width--full.share-button', {
props: {
target: '_blank'
, href: 'https://www.facebook.com/dialog/feed?app_id='+app.facebook_app_id +"&display=popup&caption=" + encodeURIComponent(app.campaign.name || app.nonprofit.name) + "&link="+window.location.href + "?/utm_source=facebook&utm_medium=organic_social&utm_campaign=" + encodeURIComponent(app.campaign.name)
, href: 'https://www.facebook.com/dialog/feed?app_id='+app.facebook_app_id +"&display=popup&caption=" + encodeURIComponent(app.campaign.name || app.nonprofit.name) + "&link="+window.location.href
}
}, [h('i.fa.fa-facebook-square'), ` ${I18n.t('nonprofits.donate.followup.share.facebook')}`] )
])
, h('div.u-inlineBlock.u-marginLeft--10.u-marginBottom--20', [
h('a.button--small.twitter.u-width--full', {
props: {
target: '_blank'
, href: "https://twitter.com/intent/tweet?url="+window.location.href+"&via=CommitChange&text=Join me in supporting:" + (app.campaign.name || app.nonprofit.name) + "?/utm_source=twitter&utm_medium=organic_social&utm_campaign=" + encodeURIComponent(app.campaign.name)
, href: "https://twitter.com/intent/tweet?url="+window.location.href+"&via=CommitChange&text=Join me in supporting:" + (app.campaign.name || app.nonprofit.name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you moved away from having the utm_medium and utm_campaign here? I think it would probably be useful.

}
}, [h('i.fa.fa-twitter-square'), ` ${I18n.t('nonprofits.donate.followup.share.twitter')}`] )
])
Expand Down
2 changes: 1 addition & 1 deletion app/views/components/_twitter_link.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<%- # License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later
# Full license explanation at https://github.com/houdiniproject/houdini/blob/main/LICENSE -%>
https://twitter.com/intent/tweet?url=<%= request.base_url + request.fullpath %>&via=CommitChange&text=<%= text %>
https://twitter.com/intent/tweet?url=<%= request.base_url + request.fullpath %>&utm_source=twitter&utm_medium=social&via=CommitChange&text=<%= text %>