---
title: "Side effect | Analytics glossary | Skene"
description: "Code that affects something outside the function it lives in. Analytics calls are side effects. So are logs, emails, and metric increments."
url: https://www.skene.ai/resources/glossary/side-effect
doc_version: "e2e2a961d17e"
last_updated: 2026-11-04
---

Resources / Glossary

# Side effect

Code that affects something outside the function it lives in. Analytics calls are side effects. So are logs, emails, and metric increments.

Coding agents

## Definition

In programming, a side effect is any code that changes state outside its local scope. Writing to a database is a side effect. So is calling an external API, and so is emitting an analytics event.

In analytics work, every tracking call is a side effect: the function does the same job whether the event fires or not. A common mistake is to read a passing test run as proof that a change kept its tracking, but a test of return values never sees the event. A Conditional firing change is the harder case, where the event still exists but fires under different conditions. The Analytics call entry covers the call itself, and Coding agent covers why rewrites put it at risk.

## Why side effects matter here

A refactor can preserve a return value while changing a side effect. Review tracking calls, external writes and their conditions explicitly; passing functional tests alone does not establish that the same evidence is still collected.

## Related terms

- [Coding agent](https://www.skene.ai/resources/glossary/coding-agent)

- [Analytics call](https://www.skene.ai/resources/glossary/analytics-call)

## Sitemap

- [Markdown sitemap](https://www.skene.ai/sitemap.md): every page on this site, with its markdown counterpart.
- [Index for language models](https://www.skene.ai/llms.txt): the same set as a link-dense index.
- [Full corpus](https://www.skene.ai/llms-full.txt): reference content concatenated as plain text.
