Code Review!
(Today's Topic: customer-journal)
Q & A
Knowledge Share
(Today's Topic: JS Fundamentals)
What's NEW Scooby-Doo?!
100

This library is used in customer-journal and listens for analytics actions that are dispatched.

What is analyticsQ?

100

Cookies being baked at Sandy's (traditional Jeopardy question form)

What is warm cookie Wednesdays?

100

This JS method creates a new array populated with the results of calling a provided function on every element in an array (parameter).

What is the .map() method?

100

We removed this library/dependency from GOTEAM to reduce the number of network calls we are making. hint: kibana

What is @dai/logger?

200

What is contained in the /dar directory of customer-journal?

The /dar directory contains individual templates for specific actions as well as the V1 template which contains all possible CIJ attributes and their defined data types.

200

The automation integration library that DAI provides for other teams 

What is lib-traffic?

200
A term for a more concise syntax that provides the same functionality for something that already exists. It aims to help make code shorter, therefore, easier to write. No new functionality is introduced.

What is Syntactic Sugar?

200

In the Jenkinsfile and maidfile of GOTEAM, we have switched from ______ to ______ as our package manager for automated tasks.

What is Yarn to npm/npx?

300

Which file(s) is the function utils.sendSchema called in? And it is it for pageLoad, interactions, or both?

It is located in the main.js file in customer-journal, and it is located in the stateChange context. It is used for pageLoad calls, including stateChange pageLoads.

300

What is the namespace of the automation library???

dai-automation

300

The process in which a function calls itself directly or indirectly is called recursion and the corresponding function is called a recursive function.

What is recursion?

300

This thing allows loading separately compiled applications at runtime. We can use it to share common dependencies and code, and it also allows the sharing of common data like information on the current user or global filters.

What is Module Federation?

400

There are currently two different "sendInteraction" functions in customer-journal. Where are they located, what do they do, and what is the difference between the two?

One is located in schema.js and the other is located in cij-utils.js

The sendInteraction in cij-utils.js is primarily used to process interactions in contexts. It updates the dataLayerSnapshot and it selects the requested hard coded schema template to use before calling schema.send() passing in the template as a parameter. It does not make a network call, schema.send() does.

The sendInteraction in schema.js is primarily used in process-context.js and is used to process any interactions with a schemaData property. It uses schemaData to dynamically generate a unique and valid template before making a network request itself.

400

What JS library does the automation library primarily use for creating tests? hint: assertions

400

The company that invented JavaScript

What is Netscape?

400

We now PRIORITIZE updating the data-layer with any pageLoad actions that include schemaData in customer-journal in GOTEAM. What file and function does this dataLayer.update() occur in costumer/journal to accomplish this on pageLoad?

It occurs in cij-utils.js in the sendSchema() function which is called main.js on pageLoad. The dataLayer.update call occurs at the top of the function and should be the last update done to dataLayer on pageLoad IF schemaData exists.

M
e
n
u