Skip to content
This repository has been archived by the owner on Nov 10, 2021. It is now read-only.

[RHDX-250] Adobe DDO Taxonomy #3515

Conversation

jordanpagewhite
Copy link
Contributor

@jordanpagewhite jordanpagewhite commented Feb 26, 2020

JIRA Issue Link

https://projects.engineering.redhat.com/browse/RHDX-250

Related Docs

https://mojo.redhat.com/docs/DOC-1093367

Verification Process

  • We can verify that we are passing taxonomy terms (by label(s)) properly to Adobe via the digitalData JS object
  • We can verify that these taxonomy terms are being captured by Adobe and can be used to filter data by our Data Analysts

For each of the following scenarios/pages, do this:

  • Visit the URL
  • Open your Chrome console
  • Refresh (Shift+Cmd+R)
  • Type digitalData.page.attributes or just digitalData into the console to inspect the digitalData JS object. We are concern with key/values under digitalData.page.attributes specifically.

You should see this:

  • Each of the digitalData.page.attributes.taxonomy* key/values should match the taxonomy terms referenced by the respective taxonomy field of that node
  • If a taxonomy field does not reference any term, then an empty array is set

OpenJDK (new, assembly-based Product page)

https://developer-preview-3515.ext.us-west.dc.preprod.paas.redhat.com/products/openjdk/overview

PR3515-ProductsOpenjdkOverview

RHEL (old, paragraphs-based Product page)

https://developer-preview-3515.ext.us-west.dc.preprod.paas.redhat.com/products/rhel/overview

PR3515-ProductsRhelOverview

Kubernetes Topic Page

https://developer-preview-3515.ext.us-west.dc.preprod.paas.redhat.com/topics/kubernetes/

PR3515-TopicsKubernetes

Containers Topic Page

https://developer-preview-3515.ext.us-west.dc.preprod.paas.redhat.com/topics/containers/

PR3515-TopicsContainers

This provides the functionality necessary to collect and pass the
taxonomy terms referenced by a node/page to Adobe via the DDO
digitalData object. These changes need to take place in both the rhdp
and rhdp2 theme, since we are supporting both themes.

Furthermore, this also updates the Adobe JS URLs and adds some footer JS
per the Mojo doc: https://mojo.redhat.com/docs/DOC-1093367.
@jordanpagewhite jordanpagewhite changed the title [RHDX-250 Adobe DDO Taxonomy [RHDX-250] Adobe DDO Taxonomy Feb 26, 2020
@jordanpagewhite
Copy link
Contributor Author

rebuild this please

Some Javascript in our html.html.twig files was overwriting
digitalData.page.category to assign values to
digitalData.page.category.primaryCategory and
digitalData.page.category.subCategories. This is undesirable because we
are passing values to the template, via rhd_dtm_script, from our PHP
preprocessing.
This moves the taxonomy* key/values under digitalData.page.attributes
instead of digitalData.page.category AND we are now using the taxonomy
term ID, instead of the Term label, as value(s).
@jordanpagewhite
Copy link
Contributor Author

Updates on latest commit (8c6d5a5)

In my latest commit, I've made 2 changes that Marcia requested:

  1. I have moved our taxonomy* key/values from digitalData.page.category.taxonomy* to digitalData.page.attributes.taxonomy*. This will keep us consistent with the way that redhat.com structures their digitalData object.
  2. Instead of passing the taxonomy term label to Adobe Analytics, we will pass the taxonomy term ID, and Marcia will perform a sort of VLOOKUP to map IDs to labels. This is because we have a limit on the length of these data that we pass to Adobe Analytics, and in instances where we could pass many taxonomy terms and the length of each term could be long, we could easily exceed that limit, which would result in a truncation of the data.

@jordanpagewhite
Copy link
Contributor Author

Blocked

Our review of this pull request seems blocked until a developers.redhat.com Adobe Analytics taxonomy data meeting on March 5 02:30-03:30pm EST.

@jordanpagewhite jordanpagewhite changed the title [RHDX-250] Adobe DDO Taxonomy [DO NOT MERGE][RHDX-250] Adobe DDO Taxonomy Feb 27, 2020
@jordanpagewhite jordanpagewhite changed the title [DO NOT MERGE][RHDX-250] Adobe DDO Taxonomy [RHDX-250] Adobe DDO Taxonomy Mar 6, 2020
@jordanpagewhite
Copy link
Contributor Author

Per our call with Marcia last week, this PR is no longer blocked. We are exploring additional options/tasks (see: https://projects.engineering.redhat.com/browse/RHDX-250).

@jordanpagewhite
Copy link
Contributor Author

rebuild this please

There are instances where a Node object cannot be fetched, like User
pages, our implementations of Product pages, etc. This adds some
conditionals to ensure that we are handling these cases properly.
There were a few places where I would like to ensure that we have a
non-empty object that is an instance of NodeInterface.
@jordanpagewhite jordanpagewhite merged commit f853a6d into redhat-developer:master Mar 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants