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

Revisions to tracking data #62

Closed
dkotter opened this issue Jun 4, 2021 · 3 comments · Fixed by #65
Closed

Revisions to tracking data #62

dkotter opened this issue Jun 4, 2021 · 3 comments · Fixed by #65
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@dkotter
Copy link
Contributor

dkotter commented Jun 4, 2021

There are some changes and additions needed for the tracking data that gets collected, to help with site automation results.

New Fields

  • type: Should be a string with one of the following values: article, video, audio, or image. Most content will be article. Propose we use the post format feature to determine this, as it directly supports all of these types. In addition, suggest we add a new filter around this to make it easy for sites to customize this (we'll want validation on this to ensure the value this filter returns is only one of those types)
  • url: Should be a string that contains the main URL of the content. This is replacing the existing canonicalURL field
  • isCanonical: Should be a boolean value. true if this item is the canonical resource. Default for most items will be true
  • promoImageUri: Should be a string that points to the URL of the featured image (should ensure we use the full size image)

Changes to Existing Fields

  • canonicalURL: This field is being removed and replaced by url and isCanonical
  • sectionNames: This is an existing field but it needs to be changed to an array of strings. If a piece of content has multiple sections (like /news/local/SLUG), this field should be ['news', 'local']. If it only has a single section (like /news/), this field should be ['news']. The first section in the URL should always show first in this array
  • plainText: This field already exists but we need new logic here to check if a piece of content has any text at all and if not, this field should be omitted. This applies mostly to non-article content that may not contain any text
  • datePublished: Field needs to be renamed to publishedAt
  • dateModified: Field needs to be renamed to modifiedAt
@dkotter dkotter added the enhancement New feature or request label Jun 4, 2021
@jeffpaul jeffpaul added this to the 1.0.3 milestone Jun 7, 2021
@dinhtungdu
Copy link
Contributor

@dkotter I have some questions related to this issue. I push my initial work for this in #65

  • We have content sync events, JS tracking, and AMP tracking that send data to Sophi. I updated the content sync part in Update content sync data #65. Do these changes apply to all places? If yes, can we have example data for JS and AMP tracking?
  • promoImageUri, does this field get omitted if there is no featured image?
  • plainText : we're using array_filter to remove all empty array items before sending data to Sophi so this is field will be omitted if empty.
  • sectionNames: we're using sectionName for string, can you confirm that we rename sectionName to sectionNames and change its data to array.

@dkotter
Copy link
Contributor Author

dkotter commented Jun 10, 2021

We have content sync events, JS tracking, and AMP tracking that send data to Sophi. I updated the content sync part in #65. Do these changes apply to all places? If yes, can we have example data for JS and AMP tracking?

They said this is only for content sync. No changes needed for the JS tracking pieces.

promoImageUri, does this field get omitted if there is no featured image?

Yes, this should be removed if no featured image

plainText : we're using array_filter to remove all empty array items before sending data to Sophi so this is field will be omitted if empty.

👍

sectionNames: we're using sectionName for string, can you confirm that we rename sectionName to sectionNames and change its data to array

Yes, this should become sectionNames and should be an array

@dinhtungdu
Copy link
Contributor

@dkotter thanks, #65 is ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants