Risk of Ruin and Leaps of Faith

When we play games, whether virtual or physical, it’s common to have an ongoing calculation of our ability to inflict damage on others and their ability to do the same to us. At every step, if we’re experienced, we are projecting future possibilities, deciding on defensive/offensive strategies, and acting with good-but-not-perfect information. In many common games, personal victory is associated with the elimination or “death” of our enemies. We have exhausted their resources and reign victorious.

There are many assumptions that are taken for granted in this sort of framework that differ from daily living, namely:

  1. A potentially large but finite/calculable set of possible outcomes
  2. Logic and rules that are intentionally designed by the creators, then agreed upon by the players implicitly or explicitly
  3. Levels of difficulty that can be reasonably anticipated and follow a predefined path
  4. Timing and whether or not to participate can be controlled by the players
  5. Survival (often at others’ expense) is the goal
  6. The chances of survival/winning are able to be calculated
  7. The definition of winning is clear
  8. When certain conditions are met, all players can agree that the game has ended

What about “regular life?”

  1. Effectively infinite amount of possible outcomes
  2. Lack of universal agreement on the “rules”
  3. Level of difficulty non-linear and unable to be anticipated
  4. Being born and years of birth and death are typically unable to be consciously controlled
  5. Survival is a laudable goal, but we can go beyond mere surviving to thriving, or we can lay down our life for a larger cause (for example to save others), and that is not viewed as “losing.” Survival at others’ expense produces severe guilt in all but the most narcissistic of individuals. The vast majority of people are not out to get us.
  6. Chances of survival overall and even for specific conditions are best guesses, and exceptions to estimates occur with such regularity that we cannot fully anticipate lifespan. This is not to say that we shouldn’t take care of ourselves; ongoing quality of life is a huge factor in old age and can be controlled to some extent by decisions we make in youth and early/middle adulthood.
  7. The definition of a life well-lived (“winning”) is not universally agreed.
  8. The end of life (“end of the game”) is not universally agreed; dying is a process and death is not always as final as we think. People who are clinically dead can return, people in comas with minimal brain activity can regain function, and people who are agreed by all to be dead still go through other physical changes and biological processes between declaration of death and how/where the body is ultimately laid to rest.

In short, the old adage “life is messy” is more true than ever. The problems come when we try to apply the rules of a game to situations where they do not apply. We can become callous to our impact on other living beings if we treat everything in life as a calculation devoid of emotion. We can cause ourselves great misery if we overestimate our level of control of external events/people, or our ability to truly anticipate the future. Hint: it’s basically none in the vast majority of circumstances. So what’s a human to do?

First, we can control our own actions, habits, and priorities. Here’s something good we can translate from games: we choose what we optimize for! If we know what we want, we can take the actions to get there, which become habits, which are guided by our priorities. The answer to how to spend our time and the calculation of what to say no to becomes much clearer when we know where we’re going and what we value.

Second, we can review our personal approach to risk. It seems like it might be nice to be able to say things like, “Going after this promotion has the potential of +2 happiness, but -5 damage to my pride if I don’t receive it, so since my pride is already hurting, I won’t attempt it.” This type of thinking assumes that we have calculable maximum potential happiness and potential ruin, and that the way we anticipate the situation is how it will actually feel during and after it happens. (The promotion is just an easy example and not a personal one for me; substitute any other difficult situation for you that causes fear.) I’ve lived enough life to know that there is happiness beyond what we think is possible, and darkness beyond what we thought we could feel. I’ve also achieved enough of my goals to know that there are many potential outcomes: sometimes it feels amazing or just like we expect, other times we realize that, once we have it, it’s not what we truly wanted, and finally there are cases where the achievement is so hard-won that we feel it wasn’t worth the sacrifice. We may have done better to let life flow a bit more naturally in those cases.

The things in life that are truly worthwhile can sometimes involve risking more than we think we can bear: going after the person, the job, the difficult goal, kicking the bad habit, starting the business, opening one’s heart to another, standing up for ourselves, undertaking the cross-country move. This is not license to risk everything with no thought to the impact to ourselves and others; however, many people go through life spending so much time avoiding potential pain that they end up regretting all the chances they never took.

We end up back at humility: we can make our best attempt, we can guide our choices with our goals and values, but ultimately, we cannot fully know the final outcome at the start. It’s worth asking ourselves over and over, “Are you sure?” I mean this as “You don’t have to believe 100% of the things you think; you can question your assumptions, then act” not “Paralyze yourself with indecision.” An attitude of playfulness can work wonders. If we take ourselves too seriously and think we have to get it right all/most the time to “win”, we’re setting ourselves up for disappointment. We’ve been wrong before and we’ll be wrong again. We’ve been right before and we’ll be right again. We learn, we grow, we change, and all that came before informs all that comes after.

Third, we can understand that separate processes exist for creative thinking and for evaluation of possibilities. If we remain stuck in “evaluation of possibilities” mode (as we would in a game), we may be closing ourselves off to new ideas that might break the mold of what we assumed was possible. We can think we know it all, when we are in fact blinding ourselves to anything that doesn’t fit our narrative. On the other hand, if we remain stuck in “creative thinking” mode, we may never get to a decision. The cumulative lack of personally initiated decisions can add up to a life determined purely by circumstance, or even determined by others who have undertaken decisions that impact us while we were daydreaming. Striking a balance between these 2 processes, known as convergent and divergent thinking, is important in life, business, and analytics. Convergent thinking relates to evaluation of ideas. Divergent thinking relates to generating ideas. We need both, but we are not capable of doing them at the same time. This is why it’s important to know which mode we’re in, and to ensure we include the opposite mode intentionally.

In closing, we are here, we are alive, we have nearly infinite possibilities, we are capable of choosing our focus, and on some level we’re along for the ride.

Everything is a Process

We are all reading this from different points in our careers and lives. We’re experiencing various degrees of comfort, satisfaction, and happiness with the trajectory we happen to be on. No matter where we sit on those continuums, we are all at various stages of a process. While we live our lives and participate in situations, especially difficult ones, it can be hard to gain enough perspective to see beyond the immediate frustration of what we’re going through at the moment. It’s easy to lose sight of the fact that a process implies a beginning, middle, and end, and that we all have multiple processes running at once.

We can take the analogy of putting together a puzzle as an apt metaphor for the stages we go through in learning new skills and solving problems in all areas. A typical way to put together a square puzzle is to find the edge pieces first to create the outline, categorize the remaining pieces by color/area, then work in a more haphazard way to fill in the middle. Finally, as most pieces get cleared, momentum builds and the end is within reach. The puzzle is completed (or you may find that there are pieces missing and make peace with that.)

Creating an Outline

When we take on a new challenge, experience a new situation, or find ourselves going through a period of change, our first instinct is often to get a handle on what exactly is happening before taking action. We gather facts and begin to form an idea of what we are working with. This stage can happen when we first start a new job, a new project, or experience a life change. It can often feel overwhelming and urgent as we attempt to get a grasp on the situation. Notably, at this stage, we don’t have enough information to know exactly how anything will turn out, but we make a commitment to starting.

Organizing the Pieces

As we form a general idea of what we’re working with, we can start categorizing the situation and break it into known areas. We can separate the problem into discrete chunks, connecting them to areas we are already familiar with, and form an idea of how and where they fit into the bigger picture. We might find ourselves performing these actions when working through a new technical challenge at an existing position, learning a new programming language, or creating a presentation. This stage can often feel great, as it’s a quick-moving way to make tangible progress.

The Messy Middle

After we get a handle on the situation and organize it in our minds, we are often left with the hardest part: moving through a period with no clear path forward and a feeling of relative disorganization. The easy parts have been done, leaving us to tend to the most difficult areas. The expression that applies here is, “The only way out is through.” We develop our grit and resilience in this stage. It may benefit us to step away from the problem periodically to regain our focus and perspective. In stepping away, we allow space for intuition and inspiration to do their work, so we can return more energized with a clearer picture of the problem. This stage feels frustrating, and we may have to fight the urge to simply give up; however, by pressing on, we begin to feel a sense of accomplishment.

Momentum Builds

As more and more of the problem gets handled, we begin to see a more complete picture of the end state, and are spurred on once again with strong momentum, as we can see the finish line. This only happens because of our earlier dedication to working through the difficulties. While there may still be some things that remain unclear, the overall situation feels much more known and understood than it did at first, and we can take pride in and reassurance from that. This is where we often reach our peak positive emotional state.


Finally, all the pieces are in place, and we can see how the completed work looks. This can miss, meet, or exceed our initial expectations, but we can appreciate our efforts to continue the project to its end goal. We may notice at the end that we are missing a piece in a key area, and must make a decision about how important that item is – should we delay the whole thing for it, or is it peripheral? Prioritizing outstanding problems and creating a “phase 2” plan can be useful. Additionally, we can feel a sense of loss, since completion is a type of ending, and means that a process we began to get used to came to its close. We must remember that we have multiple processes running at once, and there are always new horizons to explore. The end or solution to this project may have been reached, but we are not purposeless as a result! We can pause to celebrate, then take stock of areas where we’d like to spend more time, pursue new goals, or gain deeper understanding. Throughout our life, we never lose the opportunity to open ourselves to new challenges. Let us experience our true power and resilience by applying ourselves to life’s puzzles with intention and boldness, then enjoying the results.

Virtual Reality and Finding a Home in the World

At the very beginning of the pandemic, I purchased an Oculus Rift (a wireless VR headset). I knew I would be spending significantly more time at home, and had an idea that I’d want something to make things more interesting. I had come off a 2019 heavy with in-person events and travel, so it was already an adjustment to live at a slower pace (even though this was necessary and intentional.)

VR ended up playing a significant role for me during a period of many life transitions, and I’ve since spoken with others who have shared this experience. It’s easy to write it off as purely escapism, but I believe there are some interesting ways in which VR has come to function as a sense of place.

For context, let’s first consider small ways we feel at home when in non-standard physical situations. In the film Gravity, Sandra Bullock’s character encounters a series of potentially deadly challenges in space. As she makes her way from one international space vessel to another, there are small figurines consistently placed atop the instrument panel. In the Soviet space station, she encounters St. Christopher. In the Chinese space station, the Buddha. These tiny reminders serve as anchors in an unfamiliar and desolate landscape far from the astronauts’ homes.

As children, we may have a favorite stuffed animal or toy that we carry from place to place. Children can become very attached to these objects, who end up functioning almost as imaginary friends, with their own stories, complex relationships, and preferences. If this object goes missing, especially during travel to an unfamiliar place, it can throw things off significantly, as this object functions as an extension of “home” and the familiar.

Now, to the world of pixels. The settings of games, particularly immersive ones, become as familiar to us at the types of objects mentioned above, especially if we play them routinely. The interesting thing about this is that games have no physical location beyond the location we play them in. During periods of relative isolation for varying reasons (COVID, social, physical, etc.), we can come back to a place that we are familiar with, which functions as its own type of comfort.

For games that have a haptic component, this goes even further. I remember I had been at home for several weeks without much physical contact with others when I did the initial demo for the Oculus Rift. It involves dancing with a friendly robot-like character. When you place your hands in its hands, you experience a sensation in the controllers. This was jarring and unexpectedly relieving coming off of weeks of isolation. It is not a substitute for human touch by any means, but it made me remember that there was a whole world of interaction beyond the limited one I had been occupying.

I also downloaded a number of titles, including Nature Treks VR, with stunning imagery. Given my previous level of travel, I wanted to experience immersive, beautiful environments without having to go anywhere. I spent a fair bit of time on the “beach”, creating rainstorms, butterflies, and trees as desired. This beach was a constant over the course of a time when my sense of home was tenuous for various reasons. I experienced that same VR scene in 4 different physical locations.

I believe VR games create the same types of attachments and memories that we can get from our own imaginations, real physical events, and real physical objects. They can serve as a “home away from home,” being a constant at times where there may be very few things we can count on. To function, VR games must have a set of rules. The game can’t be too predictable to avoid being boring, but there must be a relationship between actions and results to move the gameplay forward. In the “real world,” this relationship isn’t always quite as simple, as external factors can come between actions and results. Worse, there are seemingly completely random elements of interference that we can’t be warned about. Who can resist the allure of a beautiful, interactive world that functions according to clearer rules than the one we currently occupy? There’s also some hope that VR can increase empathy even in violent offenders.

(Side note: the majority of my games on the VR side are for fun and stress relief. Others introduce conflict intentionally by focusing more on competitive or difficult games, which can produce a sense of accomplishment. Everyone’s motivation is different.)

I believe VR serves a real purpose, especially during COVID. However, I also believe a balance must be maintained in the longer term in our lives between being passive consumers of visual and textual information and active creators of those same types of information. I believe we most all come with innate creativity and a desire to express it to the world. This can get blunted pretty heavily if we allow ourselves to only passively consume information, such as through others’ perspectives on social media, opinion columns, TV news, etc. At a certain point, we can simply become consumers or responders to others’ thoughts, and can reduce our time spent thinking for ourselves or thinking critically.

For this reason, I believe in taking breaks from most forms of consumption on a regular basis. The way this looks for you may be different from how it does for me. I do not believe there is anything inherently wrong with the types of media I mentioned; what’s important is to avoid losing your originality and creativity by slipping too far into passivity.

To insert something remotely related to our work in analytics (and because it is very interesting), I read this article a few weeks ago, which mentions that “[u]sing only the position tracking data, we find that even with more than 500 participants to choose from, a simple machine learning model can identify participants from less than 5 min of tracking data at above 95% accuracy. Therefore, we contribute data suggesting typical VR experiences produce identifying data.”

While we’re out there keeping our sense of home, let’s also remember the importance of privacy and the not-always-common-sense way that data can come to be associated with identifiable characteristics. I don’t have all the answers, but in our roles, we’re often in the place to prevent or further anonymize PII. We can also support organizations like the EFF, who focus on passing the right legislation around complex issues.

This concludes the short tour of my thoughts on VR, our sense of place, and the ever-present reminder to keep in mind user privacy in design and data collection. Always happy to hear your thoughts in the comments, and thanks for indulging this winding exploration.

Tradition, Rebellion, Resolution (or, “Of Curmudgeons and Creators”)

In any field, you will find a continuum of those who wish to discover things for themselves/forge their own path on one end, and those who wish to stick to methodologies from the past on the other. As with most distributions we encounter, the vast majority are somewhere in the middle, but there are always extreme outliers to be found. There is value in studying the edge cases to understand the value of each perspective and to better understand where we ourselves are operating from.

Extreme Path 1: Discovering Everything for Yourself

By valuing the quest, individuals on the extreme end of this path have a higher chance of producing completely original thoughts and methods. They enjoy the thrill of chasing ideas to their conclusion and creating something new. They are unencumbered by what has historically been considered difficult or impossible, and thus may accomplish many firsts. This perspective is necessary to move the world and intellectual discourse forward.

At the same time, by ignoring entire systems of thought developed over hundreds or thousands of years, it’s possible to lose out on valuable starting points. The route ultimately followed may not be the most effective, as it ignores the benefit of discoveries from previous attempts. This may not matter to the person who wants the thrill of the quest, but may come up later as they learn enough to see the limitations of relying exclusively on their own mind.

Extreme Path 2: Relying Exclusively on the Past and Tradition

By valuing the lessons and writings of the past, these individuals have the benefit of many historical and contemporary minds who have thought through the same thing they are currently contemplating. They can appreciate the multifaceted nature of problems by reading or listening to materials from varied perspectives. This can, at its best, be a form of distributed computing across space and time. They can parse out problems to the thinkers more appropriate to the task, and process only the final result in their mind before coming to a reasoned conclusion.

Over-reliance on traditional or historical methods, however, can impede innovation. Errors or incorrect thinking can be baked into the traditional cake of ideas and may be easily overlooked, as historicity can be mistaken for truth. Many unexamined assumptions can lurk in ancient texts. Even in modern-day scientific papers and meta-analyses, we encounter the problems of bias, p-hacking to artificially back into results, and simple consequences of equipment used, among many other factors. Articles like this one give an idea of why we should not take something for granted simply because it was published in a major medical journal. This is not to say we should discount scientific findings wholesale, but we also cannot forget that science is performed by humans using human-created instruments and mental frameworks, and there can be unforeseen issues with both.

Middle Path

A balance of these two extremes involves hearing/reading a variety of perspectives with a critical eye and ear, then using these to inform a reasoned opinion after applying our own unique perspective. We can avoid the traps of discounting the value of past systems simply because they are not our own, and of blind obedience to a concept purely on the basis of its historicity.

The middle path itself can be a trap as well. We can’t pretend that the extremes don’t have potential benefit to society. It takes all types – those who remind us of the value of history (antique dealers, historians, et al.), those who push the boundaries of what’s possible (innovators, Olympians, groundbreaking designers), and those who can keep the universe moving day to day (middle grounders).

Psychological and Reasoning Perspective

The preference for innovation vs. tradition and our approach when discussing relates to the personality dimensions of Openness to Experience and Agreeableness. These are part of the OCEAN (or CANOE, if you prefer) traits that make up the Big Five, which come from Goldberg’s work (along with many colleagues and predecessors).

Openness to Experience is a spectrum much like the one discussed earlier in this post. On one side (the low side) is a total reliance on routine and predictable behaviors that have worked in the past, and on the other extreme, complete creativity and unique ways of working and behaving.

Agreeableness determines how trusting we are, among other things. If we score low on this dimension, we’re predisposed to be suspicious of any pre-drawn conclusions and won’t hesitate to discount them. If we are highly agreeable, we may give the benefit of the doubt to incomplete evidence, or “go along to get along” if someone in authority suggests that something is true. To risk beating a dead horse, these are extreme examples, and most fall somewhere in the combination/middle area of the spectrum. Clearly there are issues with 100% agreeableness or disagreeableness.

Deductive and inductive reasoning also play a role in how we express these preferences. Deductive reasoning starts from a general premise and drills down into specific details. Inductive reasoning starts from the specific and evolves to the general. A preference for one or the other may influence the way we consume information in either style. I’d guess that deductive reasoning corresponds to favoring pre-drawn conclusions and inductive reasoning lends itself to original thinking, but I haven’t seen anything definitive proving this.

If you’re more familiar with Myers-Briggs, here is an overview of how it relates to the OCEAN attributes.

If you’re interested in the relationship between personality and reasoning in general, check out this study. The irony is not lost on me of linking an academic paper in a post discussing the fallibility of human thinking, but it’s worth a read anyway.

Geographic/Historical Perspective

The degree to which non-compliance with tradition and social norms varies significantly across countries and cultures. Michele Gelfand’s book “Rule Makers, Rule Breakers” provides an interesting perspective on this. She categorizes groups into “tight” and “loose” cultures, which she describes as follows: “The tight mind-set involves paying a great deal of attention to social norms, a strong desire to avoid mistakes, a lot of impulse control, and a preference for order and structure. Relishing routine, it requires a keen sensitivity to signs of disorder. The loose mind-set, by contrast, is less attentive to social norms, more willing to take risks, more impulsive, and more comfortable with disorder and ambiguity. These different mind-sets influence our daily lives and relationships in ways that we might not be fully aware.”

The book provides a country and state-level breakdown of which mindset predominates, as well as a matrix of tight vs. loose and individualist vs. collectivist mindsets. Our ability to come to unique and unorthodox conclusions may be influenced by how much personal risk we take by doing so. In very tight, collectivist cultures, the level of risk in going against the norm may be much higher. Some may do so anyway regardless of personal cost, but the total number of people who have the courage to question may be reduced.

And Finally, Analytics

In Myers-Briggs terms, many of us in analytics are NT types, which are “analysts” or “rational temperament” types. This draws us to the field, as it requires technical skill and ability to argue points. If we relate this to the attributes we discussed, we tend to be high in openness (O) and low in agreeableness (A). This translates to people capable of highly original thought and new insights who are slow to trust. (“Anne, have you been reading my emails?” No, but I probably share a lot in common with you. Personality systems are simply models, but sometimes useful ones.)

Knowing our tendencies and limitations can help us transcend them. Growth involves giving a fair hearing to ideas and individuals that we might at first dismiss, and allowing ourselves the benefit of the wonderful trove of knowledge that came before us (with appropriate levels of review).

My goal with all of this was to explore ideas from a few conversations I’ve had in the past week, and to draw together some common psychological traits we need to be aware of that are likely impacting our work. If you have any further thoughts, I welcome your comments!

Products, Companies, People: What’s In a Name?

Our own name is one of the first things we hear regularly. It produces a specific effect on us, usually positive. It can be overused in sales tactics to build rapport, which sometimes pushes it over the edge into annoying territory. “So, Anne, what I’m trying to say is we have a best-in-class solution. Anne, I really think you’d like it. Would you be open to a call next week, Anne?”

We identify with our name, sometimes losing sight of the fact that we are not what we’re called, and that our name is a construction that was given to us. It’s not just us as individuals who get caught up in self-perception blind spots; others’ perceptions of us can also be impacted by our name. Articles like this one posit name-related impacts in how we’re treated at work, how teachers perceive us, and many other things.

Have you found yourself saying (or heard others say), “Hi, I’m [name], I work at [company name] doing [job name]”? There are 3 items in that sentence that many people take for granted. Personal names, company names, and product names or job roles seem to be written in stone when we first encounter them, but in fact they are all malleable human constructions.

When we call to mind our company name, we likely experience a flood of associations, images, and emotions related to our perceptions. Our experience creates associations between the sound of the name, the visual of the logo, and our mental constructs. Unless we ourselves have started a company or built a brand, it’s easy to forget that a person or group intentionally decided on the name and logo. Because they (likely) did a good job, it seems to us that this name and symbol have existed since the beginning of time. Branding is an exercise that follows a specific, repeatable process. Like anything else, it appears mysterious until we participate in it and see for ourselves.

Job and product names are part of the branding of a company just as much as the colors and logo. Job names may be built to portray a certain image. Level of professionalism, company culture, and more may be implicit in the way roles are named. This can also go overboard and veer into the ridiculous. “Rock star 10x engineer needed who inhales C# and exhales production-ready software same-day.” On the other side of the coin, it may produce job names and descriptions so boring and corporatized that they either put the applicant to sleep or make them laugh. “This role involves supervision of the widget factory, creating team synergy, and leveraging your skills to build a robust future-proof organization.”

There might have been an earnest intention behind these types of descriptions, but their effect can be disingenuous and off-putting. Corporate-speak isn’t doing anyone any favors (linked article is a detailed and worthwhile takedown).

Product names share many of the same characteristics as company names, which is to say created by humans, intended to fulfill branding principles, and, if done well, seem like they’ve always been around. Can you imagine a world without Air Jordans? Without Honda Accords? Without Diet Coke? These are silly and potentially materialistic-seeming examples, but they give an idea of how deeply embedded these terms can become.

What happens, then, when we encounter changes to these names? This looks different depending on which aspect we’re discussing, but the principles are remarkably similar.

For personal names? Marriage, divorce, or intentionally choosing a new first name for any variety of reasons.

For companies? Mergers or rebranding campaigns.

For job roles? Promotions, demotions, or role name changes.

For product names? Updates, reissues, renaming, etc. (Rabid fans will experience this at the same level as some of the personal name changes above since they identify with the products so much!)

All of these can throw our sense of identity into disarray if we strongly cling to ourselves as these names. (Incidentally, this year, I will have gone through a divorce, resultant name change, company change, new role title, company acquisition, and I perform work with a product whose nomenclature and branding frequently changes, so I feel pretty invested in these topics and in my experience of myself as an evolving, impermanent entity.)

If we can’t identify outside of these terms, we may feel personally threatened when changes come our way. It may feel like waking up to a green sky with Coke in a blue can. “It’s just not right!” We mistake what’s right with what we’re used to.

The NY Times recently ran a wonderful post on life transitions. The important thing to note is that transitions are a process, not an event. That means that we can shift our focus from our immediate surroundings to where we’re going. We are a vector, not just a point in space. That means the important thing is which direction we’re headed.

If we know where we’re going, we can glide over the bumps along the way, since we can see their place as temporary frustrations along a path to a better future. If we don’t have the confidence that the direction we’re heading will result in a better future, there are almost always changes and tweaks to be made that can give us a glimmer of hope. It can be something as simple as creating an experience to look forward to, even if it’s as simple as a nap, a picnic, or a good book. It doesn’t have to be expensive or complicated; we can create things to look forward to for ourselves as we define our path and refine our course. This is especially important as the world at large experiences major events such as COVID and political upheaval which may reside outside our immediate control. We create more positive momentum when we take care of ourselves and focus on the contributions we can make rather than the global events and news stories that may throw us into an overwhelmed state of pessimism.

People create brands, worlds, and systems, and you are a person. By virtue of that fact, you have that capacity. What meaning will you build? What beauty will you create? It doesn’t have to be the Sistine Chapel. It can be anything you feel drawn to. Even if you find yourself seemingly at the mercy of outside circumstances (such as involvement in a merger, rebranding, or personal change), you can frame a story – a true one – where you emerge as a better version of your past self. The result of adversity is often creativity and meaning-making. This can be a profound and necessary exercise that results in more authentic, earnest, and compassionate people. Come join us on the journey.

Traveling During COVID, If You Must

Like many of you, I traveled extensively for both business and pleasure prior to the pandemic. I’ve spent several years in the hospitality industry throughout my career, and am a collector of loyalty programs, perks, points, and miles. Also like many people, I felt a tremendous sense of loss when it became impossible to see the world in the same ways. I was supposed to go to Spain in April and Chicago in May this year, neither of which occurred; the Spain flights were actually cancelled by the airline, and I got ahead of that by requesting a refund as soon as the US restricted travel to Europe toward the beginning of the pandemic.

At this point, I am fully part of the “I can’t not travel” club, having participated in airline, hotel, and rental car business during the pandemic, as well as entering an airport lounge. The point of this post is not necessarily to encourage this behavior, but to prepare you, if, like me, you have made a risk vs. reward calculation that ends up with you back in the air.

I researched extensively prior to making the decision to travel again, even though my trips have themselves been executed last-minute. I have people in my life with higher-risk conditions, and didn’t want to put them or any of my friends at risk with my behavior. My procedures are informed by science, the experiences of others who have traveled, and a friend who is a nurse. They generally follow the CDC travel guidelines and are told from my perspective. I have used these procedures myself and recommended them to others who have successfully traveled without getting sick or getting others sick. The usual disclaimers apply: I am not a doctor, and everything you do is at your own risk.

Regions to Travel To

I review trends in the areas I consider traveling to over time for the region and the city/county, depending on the level of detail available. I consider this against the level of interaction I’m likely to have to have in the area – how many public places will I have to encounter? How much indoor vs. outdoor activity will there be? If the trends are headed in the wrong direction AND I’d have to spend a lot of time indoors and/or around crowds, that’s grounds for reconsideration.

People You Are Seeing

If visiting others is part of your trip, how have they been behaving during the pandemic? How many public places do they regularly go to, particularly indoor areas? Have they been wearing masks? Are there family members in and out of the home whose behavior they can’t account for? Do they follow/take seriously scientific findings? Do you generally trust them to be honest? (If not, why are you seeing them?)

At the Airport Before Departure

For domestic flights, which is the only type of flight I’d recommend taking if at all possible, limit your time at the airport. No need for 2 hours before the flight; 30 minutes to an hour if you have pre-check, at most. Most stores are closed anyway, so the time you’d spend looking around on a normal trip doesn’t look the same as it did last year.

Prior to entering the airport, you want to limit the exposure of your face, your clothes, and your belongings to the unknown sea of germs. To do so, you can use a disposable painting suit that zips over your clothes (which you will dispose of on arrival, plus another in your luggage for the return trip), a face shield WITH a mask underneath (plus multiple masks for your destination), and gloves (multiple pairs). You’ll want to have a plastic bag easily accessible on the plane that contains antibacterial wipes, antibacterial lotion, and potentially a hydrating nasal spray. You may also wish to bring a nasal irrigation kit such as the NeilMed Sinus Rinse kit to your destination. This isn’t a glamorous thing to discuss, but studies such as this one indicate that saline nasal irrigation can be a good adjunct to other measures to combat viruses. It is also a good practice for allergy sufferers. It should always be undertaken with distilled water (which can be purchased/delivered at your destination), not tap water, and with a sanitized container. There are also pre-mixed saline rinse kits available if you are not sure of the availability of distilled water for delivery where you are going.

Face shields alone, worn without masks, are insufficient. There are many articles to this effect, such as this one.

For the gloves, it can be easy to accidentally touch multiple items, then touch your skin or face if you are not careful. I use gloves for specific tasks, such as if it’s necessary to hold onto a railing or post while on transportation within the airport, or if it’s necessary to open a frequently touched surface, such as an overhead compartment or a restroom door. I immediately dispose of the gloves afterwards, then sanitize my hands.

In general, in the days leading up to airline travel, it is ideal to eat healthfully and hydrate more than usual to go into the trip feeling your best. Being in a pressurized cabin can be dehydrating, and even in normal times, that’s less than ideal.

Airport Lounges

Do not arrive any earlier just to spend time in the lounge. Lounges are a smaller indoor area than the terminal, but potentially have fewer people in and out, more spaced-out seating, and fewer total people using the restroom. For this reason, lounges may potentially be a safer spot in some ways for short periods. Additionally, the food in most lounges these days is set up for individual portions rather than buffet-style as you may have been used to. If you need to very quickly grab some food without waiting in a crowded line, this can be a good option, especially as there is no more meal service on many shorter flights, even in first class. Some airlines have pre-bagged snacks, and for longer flights, sometimes first class will have boxed meals, depending on the airline. Food for purchase is not generally available; bringing your own snacks may be the safest bet. If you can avoid eating on the plane, that’s safer, as you won’t have to remove your mask. These details are changing very regularly and depend heavily on the airline, so check on these before you go.

On the Plane

The safest area to sit on a plane is a window seat in first class, if you can manage it. This is reflected in several articles, including this one. Try to take a short enough flight and plan your hydration to where you do not have to use the restroom on the plane.

On arrival to your seat, wipe down the seat back pocket, seat controls, screen, remotes, air vents, and any other surfaces with an antibacterial wipe that you immediately place in a bag whose only purpose is to be thrown away. You can bring an empty plastic bag for this purpose. The airlines are sanitizing the planes, but may not necessarily be getting every potential surface in detail between each flight. After touching any common areas apart from those at your seat, use hand sanitizer. If you receive anything from the flight attendant, wipe it down, then sanitize your hands after touching it.

Keep your luggage with you if possible so you do not have to go to baggage claim and spend additional time at the airport once you reach your destination.

Upon Arrival

Head directly out of the airport, avoiding stopping anywhere if at all possible. Take off the disposable suit, face shield, and any gloves, and immediately throw them in the trash in the nearest outdoor trash can. If you must use the restroom upon arrival, do so quickly, and as usual, throughly wash your hands. Maintain your mask while outside, especially in ground transportation areas where you may be in close proximity to others.

Rental Car

In general, rental cars are preferable to public transportation or ride share options, as they are used by fewer people, and sanitized between uses. It is ideal to use a Lysol wipe on the mirror controls, seat controls, radio, dashboard, and other frequently touched areas.


The major hotel chains have detailed protocols in place for cleaning far in excess of pre-pandemic procedures. The CDC also has guidelines for hotels. My suggestion is to stay with a major chain either by yourself or with people from your own household that you have been quarantining with prior to travel. Upon arrival, use your saline nasal rinse. You may also wish to shower and change clothes for extra measure. Use Lysol wipes on door handles and other frequently touched areas. Most hotels are placing the remote in a bag these days and remembering how much of a germ magnet it is, a fact that was lost prior to the pandemic. When in common areas and upon leaving the hotel, wear a mask.

One unanticipated thing that happened to me was a middle-of-the-night fire alarm, resulting in an evacuation and fire department response. I made it outside without a mask, but was mostly able to keep my distance from others. While I hope this does not happen to you, it may be prudent to have a “go bag” with your critical items and a mask in the event you have to quickly evacuate, because you really never know with 2020.

While at Your Destination

Take all the same precautions, if not more, that you would if you were in your home city. Continue to wear masks in all public places and frequently wash your hands. Avoid spending extended time in indoor areas. If meeting others from outside of your household, favor outdoor activities where distance can be maintained.

Returning Home

Follow all the same procedures as with the departing flight. Quarantine for at least 2 weeks prior to traveling again. Immediately wash all your clothing, potentially using Lysol laundry additive. Wipe down your bags and frequently touched items, especially your phone, keys, etc.


Every action we take is a calculation, whether at home or while traveling. Articles like this one contextualize the odds of plane travel as not being particularly bad, and activities at one’s destination to be of greater importance. It’s best to avoid stacking multiple high-risk actions, such as both traveling on a plane AND attending a large event. This is how “super spreader” scenarios happen. I believe it is possible to travel relatively safely, but it requires significant effort, and nothing is a guarantee. If you must travel for whatever reason, take what you can from these tips. May you have the best of luck and avoid 5 AM fire alarms.

Law and Order and Analytics and You

Like many people (around 73 million), I watched the presidential debate last night. As difficult as it was to watch, it brought to the fore the stages of moral development, with its focus on “law and order” and discussion of motivation behind actions taken, such as paying taxes.

Morality is not a static framework, but rather one that changes as we age and develop personally over time. Sometimes people stop at a certain stage, but the possibilities are there to move beyond externally-imposed rules into universal ethics.

Why does this matter in analytics? If we administer an implementation, we become enforcers and gatekeepers of information. We’re also tasked with being the last voice of reason before any questionable code or privacy-violating item goes live. If we’re analysts, we might be pressured to present information a certain way to reach a pre-drawn conclusion. We might be caught among political factions within a company each vying for their piece of the pie, and here were are trying to present an unvarnished truth, which may have negative consequences for one of those factions.

How we respond to these challenges may vary depending on where we are within the stages of moral development. For the sake of this post, we’re speaking of Kohlberg’s Stages of Moral Development. To get ahead of this, there are valid criticisms/limitations of this framework, namely that is centered around Western males, as is much of 20th century psychology. However, I believe it’s useful to illustrate a general point.

There are 3 primary stages: Pre-Conventional, Conventional, and Post-Conventional moral reasoning. In the Pre-Conventional stage, the individual is focused only on external punishment, then later what is in it for them to obey authority. In the Conventional stage, laws are obeyed due to a desire to conform socially and gain acceptance among one’s peer group, then later to uphold societal norms. There is still a focus on external authority and consequences. In the Post-Conventional stage, there is a recognition that laws are human creations, and unjust laws should be changed to laws with greater benefit through democratic process. Finally, there is a recognition that laws must be grounded in justice to be recognized as valid, and there is an obligation to disobey laws that are unjust. There is also a clarity of one’s own values to determine what is acceptable. In the Post-Conventional stage, there is an ability to place ourselves in another’s shoes and feel empathy for their position. This stage is the only one to rise above the level of the individual to universal ethics.

How does this look when translated to life and to an analytics career? Let’s take examples from each stage for common scenarios.


Life: “I will pay the minimum amount of taxes I can get away with, because the IRS will punish me if I don’t.”

Analytics Admin: “I won’t deploy this problematic code because I’ll lose my job if I do it.”

Analyst: “I won’t lie on this report because I’ll lose my job if I do it,” or worse, “I will report this selectively to make things look better, because I’ll lose my job if I don’t.”


Life: “I will pay taxes because I want to be perceived as a conforming person and because this is a social norm.”

Analytics Admin: “I won’t deploy this problematic code because I’ll lose the respect of my peers in the industry/company if I do it.”

Analyst: “I won’t lie on this report because I want other people to see me as an honest employee.”


Life: “I will pay taxes to benefit others, and will also campaign against uses of my tax dollars I disagree with.” or “If everyone refused to pay taxes, critical infrastructure and education would be at risk, so I will pay them, and also campaign against uses I disagree with.”

Analytics Admin: “I won’t deploy this problematic code because of the impact it would have on the people that visit our site. I care about their privacy and personal information, because I would be incensed if a company was careless with my information.”

Analyst: “I won’t lie on this report, because honesty is important to me in principle. It would lead to incorrect conclusions that would ultimately hurt the business to lie about the current state of affairs, so I will produce an accurate report regardless of internal political pressures.”

There are many other possible examples and outcomes possible here, but hopefully the above examples illustrate the differences in approach among the various stages. Most adults remain in Conventional morality and do not progress to Post-Conventional. For that reason, there may always be a need for a carrot/stick approach and peer pressure to promote things like public health initiatives, getting marketers to consistently use tracking codes, encouraging users to read the knowledge base you spent hours creating, etc.

We have real responsibilities, no matter what our role is in our organization, to pursue the highest moral good we can. We all encounter situations where we come to a crossroads that can have legal implications, particularly in the ever-changing landscape of privacy laws. It is up to us what we do and why. The outcome will determine our own future and that of our companies.

Who are you, really?

This is primarily an analytics blog, but I’ve expanded my definition of “acceptable posts” a bit to include broader topics of interest to those in the industry. Part of being in any field is how we define ourselves in relation to it, and how attached we are (or aren’t) to our job. As humans, we tend to attach to temporary circumstances as if they were permanent, causing a lot of suffering when they are no longer around. We live in a rapidly changing industry, and our self-concept can suffer if we tie it to things that disappear.

How do you define yourself? Your job? The city you live in? Your home? Your marriage/relationship? Your dietary habits? Your family dynamic? Your possessions? Your pets? These are all impermanent. In fact, I’ve had total or partial losses or changes in every single one of these areas in 2020, and I’m still standing. That means that there is a part of me (and a part of you) that isn’t defined by any of these things, despite our insistence on introducing ourselves by these definitions. I didn’t disappear or fly away when all these things happened, which means who I am, and who you are, is larger than all of that.

The point of this post isn’t to dwell too long on my personally difficult year, but to illustrate that the things we think we depend on aren’t actually required for us to live a fulfilling life.

It’s easy to fall into alarmism these days – our whole field is seemingly at risk because of a browser change! Who’s down with ITP (yeah you know me?) Big companies are getting sued for privacy violations! CNAME records may be at risk! Webkit policies go brrrr! [Insert favorite extension here] is no longer available on the Chrome Web Store! Let’s take a deep breath and run some comparisons (and perhaps create a parody of “We Didn’t Start the Fire” while we’re at it).

Digital analytics as a field is constantly evolving. So many things that were “the death of analytics” have fallen flat, as have all previous predictions of the world at large ending. This is not to say that the industry is infallible by any stretch, or that it’s wrong to bring up potential big changes, but we can’t jump ahead to the worst conclusions before things are even productionalized. We also have to be realistic that entire industries transform unimaginably given sufficient time.

If, for example, analytics were forced to undergo a transformation as vast as the one from horse-drawn carriages to cars (or, more aptly, from slide rules to calculators), would this really be a bad thing? Innovation for innovation’s sake isn’t what I’m after, but innovation that moves the world forward and gets people to their intended result more quickly is a net positive. The first stage of innovation is upheaval and disruption of established norms. At this stage, everything looks crazy from the outside and the new method/product hasn’t achieved wide acceptance yet. As time passes and acceptance grows, some of the initially reticent people will come to accept it, followed by eventually the most skeptical. It’s all part of the product adoption curve, which can be applied to technologies/approaches in addition to actual products.

Most of the well-known writers in this industry are innovators/early adopters in terms of this curve. That means that they’re learning about things as they occur, and those things may or may not take off enough to reach full adoption. That’s part of why we can’t be overly alarmist each time something new comes down the line. It’s a tight balance between staying informed and information overload/analysis paralysis.

To succeed and grow, we must find a home within ourselves as people independent of outside forces. From our solid foundation, we can bring our whole selves to our jobs, ready to weather the forces of change, and know ourselves as larger than our circumstances. We are nothing if not our ability to adapt and prosper from seeming adversity.

When I think about these concepts, I can’t help but hear the voice of Tyler Durden: “You are not your job. You are not the contents of your wallet.” Of course, he goes on to say “You are the all-singing, all-dancing crap of the world,” which is the opposite of what I’m saying to you.

Granted, everyone can feel like that at times, but what I’m trying to eventually get to is a message of…hope? I’m not all the way there, but may we all achieve a strong enough sense of ourselves that we can know who we are outside of the constantly changing background of circumstances. Who might that be? Someone who knows themselves, their intentions, what they value, and how well they can adapt in any situation.

Games of Chance, Analytics, and Life

I’ve come to notice over the past few years an interesting overlap between those interested in analytics and those interested in gambling. I’ll be the first to admit that I have a long-held aversion to gambling, and at one point actually took vows that prohibited it as part of a mindfulness practice. (They’ve since expired, but I still haven’t participated.) However, I’ve been conducting an inquiry into why this overlap exists, which has led me down an interesting psychological and intellectual pathway worth detailing.

The common theme among many analytics professionals whose work I respect has been an interest in poker, a game of chance, skill, psychological profiling of self and others, good old fashioned razzing your opponents, and calculated risk, among other things. As I thought more about this, I began to see where this dovetailed with both key focuses of an analytics career, as well as an approach to life in general.

Part I: Chance, Skill, and Calculated Risk

Many of us have come from or at some point worked in the world of startups, whether that be marketing technology companies, early employees of the major vendors, smaller agencies, or otherwise. To succeed in this world requires a level of risk-taking and openness to experience that not everyone possesses, with no guarantees of success. Those startups that bend the odds in their favor do so because of factors such as timing of their product launch, the state of the market/competition, resonance with users, the image the company projects, and, sometimes, the personal charisma of the founders and/or spokespeople. Additionally, stock options, often offered to early employees, are themselves a gamble. So much of this is “right place, right time” type of luck, but a percentage of it is skill. VC firms invest in a portfolio of companies, expecting many of them to fail, but making up for it with a few outsized successes.

To succeed in poker requires a similar combination of factors. There are mathematical odds that can be calculated at every step, but there is a human factor that can bend the game in a particular direction. Players that succeed do so because of factors such as the relative inexperience or exploitable qualities of others at the table (state of the market/competition), ability to stay multiple steps ahead and project what others might do (which translates to building an effective user experience, as well as an effective company), and an ability to control how others see them (image/charisma). Ultimately, however, the game is played against the unforgiving master of probability combined with human psychology, which can create winner’s tilt (startups that are unicorns due to some chance factor who then go on to risk everything and lose it all), or bad tilt (startups that have a hard time acquiring customers, acquire a bad attitude instead, and end with the founders throwing in the towel and/or selling the company in a fire sale).

(For those unfamiliar with these terms, you can read further about understanding tilt and avoiding tilt.)

It’s easy to see why someone willing to gamble on a startup (or willing to enter a field that is fairly new and constantly changing) would be willing, able, and interested in literal gambling.

Part II: Psychological Profiling

To succeed in the corporate world requires self-knowledge, as well as an understanding of how to interact with varying personalities and groups. This is actively encouraged, particularly as one approaches the executive levels. The vast array of coaching, personality inventories, and team building boggles the mind (and accounts for a very large industry). There is nothing wrong with this, as there’s value for business and for life in having a realistic assessment of one’s own strengths and weaknesses, as well as how those interplay with those of others. However, this can quickly veer into unproven methodologies, the poppiest of pop psychology, etc.

Skill in poker also involves quite a bit of psychological profiling. As players advance, they are encouraged to assess the others at the table in terms of where they’re from, their tells, their appearance, their demeanor, etc. This can translate into an intuition for how they might behave or perceive the actions someone else takes, which can be exploited for gain. The gain in poker is taking someone else’s [real or theoretical] money, whereas the gain in business is getting others to work well with you. It can also, however, translate to stealing customers from a competitor when a crack is discovered in the façade of their product, which brings us to our next point.

Part III: Razzing Your Opponents

Many companies, particularly smaller ones but some larger ones as well, create a bond among their employees over outfoxing the competition. Any misstep by a competitor is celebrated and viewed as an opportunity to make fun of them (usually off the record), pursue that company’s frustrated clients with the promise of a better experience, or simply enjoy the schadenfreude. Sometimes this translates to the public space, such as John Legere’s direct tweets lovingly insulting other cellular providers in recent years.

Realistically, though, it’s also important not to underestimate the competition, or assume they’re not doing their due diligence on you as well. As humans, we tend to overestimate the amount of success due to our own skill and underestimate the role of luck. This relates to hindsight bias and hyperactive pattern detection. (Very interesting reading the The Atlantic on this phenomenon in general, and in The Sydney Morning Herald as it applies to poker and the stock market.)

In poker, putting others on tilt by finding their buttons is encouraged. Knowing them better than they know themselves and not letting them get comfortable are real strategies. Here we find something likely to be familiar to our aforementioned early startup employees: projecting a larger-than-life image and needling the competition. Brings to mind Salesforce’s early days of staging fake protests and commandeering taxis at competitors’ events.

Part IV: An Approach to Life

So, where does that leave us? What if one isn’t interested in putting real or imaginary money on the line, but finds these concepts fascinating? You might be someone who gambles with their life, which is actually all of us. I don’t mean in the sense of risking death per se, but we all take calculated risks every day (which goes without saying during COVID-19 especially).

To assess our risks and life choices requires the following:

  1. An understanding of cognitive biases
  2. Mindfulness of our thoughts
  3. Realistic odds calculation (e.g. understanding of real-life probability)
  4. A decision to act

These are solid life skills I don’t hesitate to universally recommend. If poker gets you there, great. My cautions are 3:

  1. The obvious risks of financial ruin and addictive behavior. If you’re struggling with these, there are resources like this one, which includes a great chart further down on how to satisfy the same urges that cause problem gambling, as well as organizations on the topic.
  2. The risks to one’s worldview. What do I mean by this? I’ll use the example of when I did a fair bit of karate at one point in my life. This caused me to view every public encounter from the perspective of which escape routes I had and which moves I could pull if someone came at me from various angles. When you have a hammer, everything’s a nail. Similarly, if you view life from a poker perspective, it’s a zero sum game, where intentions conflict and players don’t cooperate around a common goal. “But isn’t life actually like that, Anne?” Not necessarily, though game theory is interesting and includes more than this approach. I find Stephen Covey’s book The Third Alternative an interesting perspective as well if you want to get away from zero-sum thinking (concept here, book here).
  3. The motivation that gets you to the game. If it fulfills a need for you and doesn’t cause problems in your life, all the better. It’s important to be realistic about what brings you to the table. I’ve seen a pattern where people sign up to break themselves against the odds at times when the rest of their life has gotten out of control. Games can provide a controlled microcosm in which to play out our psychological tendencies, and can be an expression of avoidance or desperation. They can also be a fun diversion.

Overall, my inquiry has led me to a deeper appreciation of the parallels, life skills, and complexity behind the game. I don’t know if I’ll ever play personally or not, but I’ve learned a lot toying with these ideas. If you have experience with these areas, feel free to share in the comments.

Additional articles of interest:

How I Used Professional Poker to Become a Data Scientist

Psychology and Poker

Hold or Fold – Playing Your Big Data Hand to Win

What UTM Tags and Poker Have in Common (funny video)

Tracking YouTube Videos in iFrames with Adobe Launch: A Simpler Approach

Making this process a little less painful by going as directly as possible to the YouTube API.


Embedded YouTube videos in iFrames are everyone’s favorite (read: least favorite) scenario to encounter when designing tracking for a site, particularly if you do not have access to development resources to send details on video activity. Fortunately, there are ways for you to manage this entirely yourself!

What Doesn’t Work

First, let’s rule out some things that won’t work in this scenario so you know what to avoid:

The Built-in Core Extension’s Media – Play, Pause, etc. Events: Using the CSS selector of the iFrame or the surrounding components will not properly pick up the events in this scenario.

The Adobe Analytics for Video Launch Extension: This still requires you to take an additional step of mapping the events received from YouTube, which we’ll do here with some simple code without having to use this extension.

The YouTube Embed Extension for Adobe Launch: If your video already exists on the page, this won’t help you, as this extension is used to insert videos on the page.

Past Solutions from DTM

Next, let’s discuss some past solutions from the world of DTM:

Adobe’s DTM Recommendation: This requires additional parameters to be added onto the video URL (which we can do from our side in the tag manager, rather than rely on making updates across the whole site). It also requires the additional of a large custom code block for the Adobe Media Tracking code.

33Sticks DTM Recommendation: This is a great place to start, as it automatically appends the proper parameters onto the video with no work from other developers. However, perhaps you’re trying to reduce the amount of custom code you have overall, and you may not want to rely on the continued functioning of the raw Adobe Analytics Media Module code in the world of Launch.

Can we do the same thing with fewer lines of code and without relying on things like Heartbeat, the Media Module, etc.? Turns out we can!

How This All Got Started

I was working through a particularly ornery YouTube video tracking scenario and wanted to start completely from scratch to get the cleanest possible solution with the least amount of code that I felt would maintain well long-term. The YouTube API seems fairly stable, and as long as that doesn’t change significantly (and if it did, it would be clearly announced), this code should continue to work for a good while.

I was playing around with multiple options, and had a jam session with the fantastic Jim Gordon, owner of what I’ll call my “brother site”, Jimalytics and creator of the Tagtician Chrome extension. We both played around in the console for awhile, I hit upon the different event states, and we had an impromptu hackathon where this all came together pretty quickly. The majority of the second code block is based his work while we talked through it in that session. I’ve made additional modifications for my use case and written up the details so we can share this with the world.

Requirements for this Solution

We’ll need the following items for this work:

  • The addition of the enablejsapi parameter to the video URL and a unique player ID to be appended to each video on the page (even if you have only one video on the page, it still needs an ID). This allows the items from within the iFrame to communicate with the surrounding site.
  • Code to listen for the YouTube events and map them to _satellite.track call
  • Rules set up in Adobe Launch to listen for the direct calls you set up above
  • Events and Variables configured in Adobe Analytics admin to receive these events

Assumptions: you are running an existing, functional implementation of Adobe Analytics and Experience Cloud ID service on your site.

Part 1: Adding the enablejsapi parameter and unique player IDs to all YouTube videos on the site

Jason Thompson has already done exactly this in the first part of the above 33Sticks post, so we can use the same method – no need to change what works!

We’ll use this to append the parameters and IDs in cases where we see that the Enable JS API parameter is not already present.

This code should go in the Adobe Analytics extension in the “Configure Tracker Using Custom Code” section. (General note: when copying/pasting code, ensure proper formatting is retained, and ideally paste into a plaintext file or code editor to save locally before adding to Adobe Launch.)

/*Video Code Block 1 of 2: Append Enable JS API Parameter and Unique Video ID for Video Tracking.*/
var n=0;

jQuery('iframe').each(function() {
 var src = jQuery(this).attr('src');
	if (src.indexOf('youtube.com') > -1) {
    	if (src.indexOf('?') > -1) {
			if (src.indexOf('enablejsapi') == -1) {
				src = src + '&enablejsapi=1';
     	} else {
	 		src = src + '?enablejsapi=1';

		jQuery(this).attr('id','player' +n);


Part 2: Code to Listen for the YouTube events and map them to _satellite.track calls

Here’s, it’s important to understand the values that the YouTube API passes back for the various video states:

  • -1 – unstarted
  • 0 – ended
  • 1 – playing
  • 2 – paused
  • 3 – buffering
  • 5 – video cued

We’ll reference these numbers in the code, so this will help you understand what is happening in the case statements you see. You can read the full YouTube API documentation here, but you don’t need most of it for this solution; feel free to reference if you want to customize further. You might also see the following in other code:

  • YT.PlayerState.ENDED
  • YT.PlayerState.PLAYING
  • YT.PlayerState.PAUSED
  • YT.PlayerState.BUFFERING
  • YT.PlayerState.CUED

These are identical to the above numeric values, and we’ll be using the numeric values only in this example.

Key things to know:

  • This example tracks 3 events: start, end, and pause. This code can be modified using the event codes listed above to add additional case statements as needed.
  • This code doesn’t collect video name but could easily be modified to do so using after reading through the YouTube API details, or you could grab the document.title from the overall window in a data element for later use, whatever makes the most sense for your use case.
  • This code example assumes there is always only 1 video per page, and that you are using the script above to insert the player names. That is why the name “player0” is hard-coded in. You can make this piece of the code dynamic to look for any player name according to the syntax you are using.
  • Auto-play videos sometimes play too soon to be caught immediately if the Adobe code takes time to load.
  • The channel name can be a name that you specify. In 2 locations, I have the placeholder text “channelnameofyourchoice.” Change this to a more meaningful name describing the type of videos your site hosts.

Without further ado, here is the second block to add just beneath the earlier one in the “Configure Tracker Using Custom Code” section of the Adobe Analytics extension.

/*Video Code Block 2 of 2: Add event listener and fire _satellite.track rules. */ 

try {var addYoutubeEventListener = (function() {

    var callbacks = [];
    var iframeId = 0;

    return function (iframe, callback) {

        // init message listener that will receive messages from youtube iframes

        if(iframeId === 0) {
            window.addEventListener("message", function (e) {

                if(e.origin !== "https://www.youtube.com" || e.data === undefined) return;
                try {
                    var data = JSON.parse(e.data);
                    if(data.event !== 'onStateChange') return;

                    var callback = callbacks[data.id];
                catch(e) {}

        // store callback
        callbacks[iframeId] = callback;
        var currentFrameId = iframeId;

        // sendMessage to frame to start receiving messages
        iframe.addEventListener("load", function () {
            var message = JSON.stringify({
                event: 'listening',
                id: currentFrameId,
                channel: 'channelnameofyourchoice'

            iframe.contentWindow.postMessage(message, 'https://www.youtube.com');

            message = JSON.stringify({
                event: "command",
                func: "addEventListener",
                args: ["onStateChange"],
                id: currentFrameId,
                channel: "channelnameofyourchoice"
            iframe.contentWindow.postMessage(message, 'https://www.youtube.com');

addYoutubeEventListener(document.getElementById("player0"), function(e) {
    switch(e.info) {
        case 1:
        case 0:
        case 2:

catch(err) {console.log("Video Tracking Not Present");}

Part 3: Set up Rules in Adobe Launch to Capture The Direct Calls

Now that you have added the appropriate parameters to the video and captured the events from the video, you want to ensure these events make it into Adobe Analytics. For purposes of this post, we’re going to assume you have the ability to create new rules in your Adobe Launch environment, and that you’re an experienced Adobe Analytics administrator who has already set up the appropriate events for the different video states you’d like to track.

In my example above, I am sending video_start, video_end, and video_pause. I’ll need to create one rule for each.

Name each new Launch rule according to your rule naming convention. (What? you don’t have one? Jim and I agree on that as well – check out his post here. I tend to use a modification of this in a lot of my implementations using the same principles. He’s written them up in a concise way in this article.)

In the “IF” section, select “Core” as the Extension and “Direct Call” as the event type. In the “identifier” section, enter the same text you are sending in the _satellite.track calls in your code, for example video_start for the Video Start rule. Keep your changes and go back to the main rule.

In the Conditions section, you have the option to save yourself a lot of server calls (i.e. money). Do you really want to fire something every single time every visitor plays, pauses, or ends a video, especially if there are a lot of visitors and/or a lot of videos and/or really distracted visitors who pause a lot? If you only want to know whether something occurred at least once, you can set a condition using logic type Regular, the “Core” extension, and a “Max Frequency” condition type. You can set it to return true no more than once every “1” page views. This will prevent the call from going out over and over again if people are taking multiple actions. You’ll be able to see the difference if you look at your network calls before and after implementing the max frequency setting.

In the Actions section, you’ll want Adobe Analytics – Clear Variables, Adobe Analytics – Set Variables, and Adobe Analytics – Send Beacon.

  • In the Set Variables item, select the appropriate event to fire, and add any additional informational eVars you might want to configure for the video name, etc.
  • In the Send Beacon section, select the s.tl() option so that the event is not treated as a new page view. You can optionally enter a custom link name to describe the video action, but this is not required and is a bit duplicative.

Testing On Your Site

Build your changes into a development library. Navigate to a page where a video is present on your site, either on a page on your lower environment, or by going to your production site and using something like the Launch and DTM Switch Chrome extension (or the Charles Proxy Map Remote function if you’re feeling fancy or not using Chrome) to switch out the environment reference to use your development library on the prod site. Take various actions on the video while monitoring your network calls or looking in a debugger and ensure the events fire when you expect them to. If everything looks good, publish and re-test on production.

Final Thoughts

Our little experiment turned into something that can hopefully be of use to a larger audience. Play around and see what works for you!