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

Content Interaction #12

Open
jerry-bennett opened this issue Jun 26, 2023 · 2 comments
Open

Content Interaction #12

jerry-bennett opened this issue Jun 26, 2023 · 2 comments

Comments

@jerry-bennett
Copy link
Contributor

Content Interaction

Javascript Code

window.dataLayer = window.dataLayer || [];
dataLayer.push({ event_data: null });  // Clear the previous event_data object.
dataLayer.push({
  "event": "content_interaction",
  "detailed_event": "Content Interaction",
    "event_data": {
        "archived": <archived>,
        "author": "<author>",
        "author_id": "<author_id>",
        "content_type": "<content_type>",
        "date_published": "<date_published>",
        "event_count": "<event_count>",
        "format": "<format>",
        "interactive": <interactive>,
        "language": "<language>",
        "method": "<method>",
        "parent": "<parent>",
        "post_id": "<post_id>",
        "project": "<project>",
        "region": "<region>",
        "subtype": "<subtype>",
        "tags": "<tags>",
        "template": "<template>",
        "type": "<type>"
    }
});

Variable Definitions

Path Type Description Example Pattern Min Length Max Length Minimum Maximum Multiple Of
event_data.archived boolean Whether the content has been archived Yes, No
event_data.author string The expert(s) who have created the content; can include a comma separated list of authors Sandra Rozo, Hernan Winkler
event_data.author_id string ID for distinct author in Wordpress
event_data.content_type string Captures the content category like post, essay, or research post
event_data.date_published string Captures the publish date of content items (i.e. article or blog post). 37247, 40544 ^([0-9]{4})-(1[0-2] 0[1-9])-(3[01] 0[1-9] [12][0-9])$
event_data.format string Post type Page, Landing Page, Article, Event, Collection, Book and News
event_data.interactive boolean Whether it is interactive content Yes, No
event_data.language string Language in which the content is viewed en
event_data.method string Method
event_data.parent string "Parent" dropdown in the Post Options panel of the Wordpress Editor UI Events, Experts, Home
event_data.post_id string Unique content identifier 617631
event_data.project string Initiatives tied to a research program Brookings Economic and Social Policy in Latin America Initiative
event_data.region string Geo Africa, Asia & the Pacific
event_data.subtype string Subtype of post Op-ed, Podcast, Testimony
event_data.tags string From Wordpress Post Editor under the "Tags" dropdown within the format dialogue. Covers "Series", "Blog". 17 Rooms Podcast, Africa in Focus
event_data.template string Template type in Wordpress Research & Commentary Landing
event_data.type string Type of post Commentary, Research
@jerry-bennett
Copy link
Contributor Author

Tested on: https://preview.brookings.edu/articles/how-much-will-the-climate-provisions-in-the-ira-cost-and-what-will-they-achieve/

Use case: Clicked on the facebook icon

Status: Looking good, @jmoconn @cecilia-liu22 had some questions about the "format" and "type" variables. Are these the values you're expecting?

Image

Image

@jmoconn
Copy link
Collaborator

jmoconn commented Jun 28, 2023

@jerry-bennett I think the value for format and type is an open question but will defer to you all on what you'd like here. I know we have a call later today so maybe we could discuss then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants