Page MenuHomePhabricator

Acoustic - request to store click data in mailing stats
Open, Needs TriagePublic

Description

@JMando has asked us to retrieve and store click information which is now available via Acoustic (as of Dec 20 2022)

Note that the columns for this exist in the civicrm_mailing_stat table (clicked_total & clicked_unique) which is populated using the Omnimailing.load api (which in turn calls Omnimailing.load).

I expect the field needs to be mapped in both civicrm_api3_omnimailing_get and civicrm_api3_omnimailing_load. I have mapped it in the repo we leverage

We can view an individual email with data in Acoustic here

That same email can be retrieved with this command

drush @wmff cvapi Omnimailing.get sequential=1 start_date='2023-08-10 08:09:55' end_date='2023-08-10 09:00:00'

The underlying apis accessed are
https://developer.goacoustic.com/acoustic-campaign/reference/getsentmailingsfororg
https://developer.goacoustic.com/acoustic-campaign/reference/getaggregatetrackingfororg

https://github.com/eileenmcnaughton/omnimail-silverpop provides a rationalisation layer for accessing these &
https://github.com/mrmarkfrench/silverpop-php-connector has a raw api wrapper - note it handles both Rest & Xml api calls - which is often a question Brian will ask - but it doesn't have handling for every call that they support as it is added as-needed
Note we run Omnimailing.load in 3 process-conrol jobs

omnimail_mailing_load_older1.yaml
Omnimail_mailing_load_older2.yaml 
omnimail_mailing_load.yaml
  • the command looks like
    sh -c "echo '{\"start_date\":\"8 weeks ago\", \"end_date\":\"4 weeks ago\", 
\"mail_provider\":\"Silverpop\"}' | /usr/local/bin/drush @wmff -vv --in=json cvapi Omnimailing.load"

& to just call Omnimailing.get it would be the same with the different action

We can backfill with the same command but different dates

Event Timeline

Change 949599 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Some docs improvements on Omnimail extension

https://gerrit.wikimedia.org/r/949599

Change 949600 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Change order of returned fields

https://gerrit.wikimedia.org/r/949600

Actual date of when clicktracking was turned on: Dec 20 2022

This comment was removed by KHaggard.

Change 949601 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Composer update on wikimedia/omnimail-silverpop

https://gerrit.wikimedia.org/r/949601

Note I've pushed up a couple of patches that are just tweaks i did writing this up

Change 949599 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Some docs improvements on Omnimail extension

https://gerrit.wikimedia.org/r/949599

Change 949600 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Change order of returned fields

https://gerrit.wikimedia.org/r/949600

Change 949601 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Composer update on wikimedia/omnimail-silverpop

https://gerrit.wikimedia.org/r/949601

AKanji-WMF subscribed.

Moving to triage to check in on what still needs to be done for this phab.

Change #1028609 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Add clicked_total & unique to stats fetched

https://gerrit.wikimedia.org/r/1028609

Change #1028609 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Add clicked_total & unique to stats fetched

https://gerrit.wikimedia.org/r/1028609