{"action":"closed","issue":{"url":"https://api.github.com/repos/Automattic/facebook-instant-articles-wp/issues/182","repository_url":"https://api.github.com/repos/Automattic/facebook-instant-articles-wp","labels_url":"https://api.github.com/repos/Automattic/facebook-instant-articles-wp/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/facebook-instant-articles-wp/issues/182/comments","events_url":"https://api.github.com/repos/Automattic/facebook-instant-articles-wp/issues/182/events","html_url":"https://github.com/Automattic/facebook-instant-articles-wp/issues/182","id":149642239,"number":182,"title":"Adjusting analytics embed based on post data","user":{"login":"smerriman","id":6667004,"avatar_url":"https://avatars.githubusercontent.com/u/6667004?v=3","gravatar_id":"","url":"https://api.github.com/users/smerriman","html_url":"https://github.com/smerriman","followers_url":"https://api.github.com/users/smerriman/followers","following_url":"https://api.github.com/users/smerriman/following{/other_user}","gists_url":"https://api.github.com/users/smerriman/gists{/gist_id}","starred_url":"https://api.github.com/users/smerriman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smerriman/subscriptions","organizations_url":"https://api.github.com/users/smerriman/orgs","repos_url":"https://api.github.com/users/smerriman/repos","events_url":"https://api.github.com/users/smerriman/events{/privacy}","received_events_url":"https://api.github.com/users/smerriman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-04-20T03:03:44Z","updated_at":"2016-06-27T18:15:11Z","closed_at":"2016-06-27T18:15:11Z","body":"I want to set some post-specific custom variables within the Analytics embed code.\r\n\r\nIt's been mentioned several times that `instant_articles_transformed_element` can be used to filter the article - but while it looks like I can *add* to it, everything in the object parameter seems to be stored as private variables in a way that doesn't allow you to alter anything.\r\n\r\nA couple of hacky options I've thought of:\r\n\r\n- disable the embed code entirely, use that filter, and duplicate all of the code that adds it (not ideal, and I see there are other functions throughout the plugin which use the setting which are possibly affected?)\r\n\r\n- somehow use the https://codex.wordpress.org/Plugin_API/Filter_Reference/option_%28option_name%29 filter to alter the embed code at the point it's fetched from the database - but this could affect what gets displayed on the admin page as well and break things.\r\n\r\nCould you perhaps add some more filters that allow altering this content, or is there a better way?"}}
{"actor":{"display_login":"everton-rosario"}}