Skip to content

Instantly share code, notes, and snippets.

@kopylovvlad
Created June 20, 2017 17:19
Show Gist options
  • Save kopylovvlad/d13e100b0d79d3e554f3300ef8dffd83 to your computer and use it in GitHub Desktop.
Save kopylovvlad/d13e100b0d79d3e554f3300ef8dffd83 to your computer and use it in GitHub Desktop.
TrackingClick
.preload(:trackingpostback, :device, :campaignaction, :customer, :campaign, :user, :account)
.select(:utm_source, :utm_campaign, :utm_medium, :utm_term, 'device.platform', 'Count(tc.id)', 'Count(DISTINCT d.id)')
.where(utm_source: :youtube)
.where('device.createdat >= 2017-03-01 00:00:00')
.group([1, 2, 3, 4, 5])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment