{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/content-performance-manager/issues/696","repository_url":"https://api.github.com/repos/alphagov/content-performance-manager","labels_url":"https://api.github.com/repos/alphagov/content-performance-manager/issues/696/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/content-performance-manager/issues/696/comments","events_url":"https://api.github.com/repos/alphagov/content-performance-manager/issues/696/events","html_url":"https://github.com/alphagov/content-performance-manager/pull/696","id":321632380,"number":696,"title":"Delete all events after we import GA metrics","user":{"login":"KyleMacPherson","id":13124899,"avatar_url":"https://avatars2.githubusercontent.com/u/13124899?v=4","gravatar_id":"","url":"https://api.github.com/users/KyleMacPherson","html_url":"https://github.com/KyleMacPherson","followers_url":"https://api.github.com/users/KyleMacPherson/followers","following_url":"https://api.github.com/users/KyleMacPherson/following{/other_user}","gists_url":"https://api.github.com/users/KyleMacPherson/gists{/gist_id}","starred_url":"https://api.github.com/users/KyleMacPherson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KyleMacPherson/subscriptions","organizations_url":"https://api.github.com/users/KyleMacPherson/orgs","repos_url":"https://api.github.com/users/KyleMacPherson/repos","events_url":"https://api.github.com/users/KyleMacPherson/events{/privacy}","received_events_url":"https://api.github.com/users/KyleMacPherson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-09T16:05:55Z","updated_at":"2018-05-10T08:43:03Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/alphagov/content-performance-manager/pulls/696","html_url":"https://github.com/alphagov/content-performance-manager/pull/696","diff_url":"https://github.com/alphagov/content-performance-manager/pull/696.diff","patch_url":"https://github.com/alphagov/content-performance-manager/pull/696.patch"},"body":"We have some discrepancies between the data we receive from GA and the data we store in our facts_metrics table, ideally the data in facts_metrics would accurately represent the metrics we receive from GA. We know that the correct data is imported into events_gas table from GA, however we have some discrepancies between facts_metrics and GA due to facts_metrics identifying pages by their base_path and GA using the page_path.\r\n\r\nIn this PR we are deleting all rows from events_gas table after they have been transformed and loaded into the facts_metrics table. We will work on representing the GA data accurately in the facts_metrics table in a later PR.\r\n\r\nNote: We have removed the shared_examples previously used to test the TransformPath module because it was no longer possible to test it in that manner due to us deleting all GA::Events during the ETL process. We have added a unit test, testing the module in isolation, instead."},"comment":{"url":"https://api.github.com/repos/alphagov/content-performance-manager/issues/comments/387992397","html_url":"https://github.com/alphagov/content-performance-manager/pull/696#issuecomment-387992397","issue_url":"https://api.github.com/repos/alphagov/content-performance-manager/issues/696","id":387992397,"user":{"login":"KyleMacPherson","id":13124899,"avatar_url":"https://avatars2.githubusercontent.com/u/13124899?v=4","gravatar_id":"","url":"https://api.github.com/users/KyleMacPherson","html_url":"https://github.com/KyleMacPherson","followers_url":"https://api.github.com/users/KyleMacPherson/followers","following_url":"https://api.github.com/users/KyleMacPherson/following{/other_user}","gists_url":"https://api.github.com/users/KyleMacPherson/gists{/gist_id}","starred_url":"https://api.github.com/users/KyleMacPherson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KyleMacPherson/subscriptions","organizations_url":"https://api.github.com/users/KyleMacPherson/orgs","repos_url":"https://api.github.com/users/KyleMacPherson/repos","events_url":"https://api.github.com/users/KyleMacPherson/events{/privacy}","received_events_url":"https://api.github.com/users/KyleMacPherson/received_events","type":"User","site_admin":false},"created_at":"2018-05-10T08:43:03Z","updated_at":"2018-05-10T08:43:03Z","author_association":"CONTRIBUTOR","body":"![](https://github.trello.services/images/mini-trello-icon.png) [(3) Investigate discrepancies in GA data when aggregating by day](https://trello.com/c/HvXYUgNZ/280-3-investigate-discrepancies-in-ga-data-when-aggregating-by-day)"}}
{"actor":{"display_login":"KyleMacPherson"}}