Skip to content

Add view-tracking pixels to README and notebooks#22

Open
NirDiamant wants to merge 1 commit into
mainfrom
add-view-tracking-pixels
Open

Add view-tracking pixels to README and notebooks#22
NirDiamant wants to merge 1 commit into
mainfrom
add-view-tracking-pixels

Conversation

@NirDiamant

@NirDiamant NirDiamant commented Jun 7, 2026

Copy link
Copy Markdown
Owner

What

Adds the 1x1 analytics view pixel to the README and to all 22 notebooks, pointing at this repo's own views tracker (prompt-eng-tracker).

Why

This repo currently records 0 views. It had only click links (routed through the RAG_Techniques tracker) and no view pixel, so README and notebook page views were never counted, unlike RAG_Techniques, which carries the same pixel.

Details

  • README: one pixel appended (?notebook=main-readme).
  • Each notebook: a final markdown cell with a unique ?notebook=<slug> using the existing -- hierarchy convention.
  • Byte-preserving insertion; only the new cell is added. All 22 notebooks re-validated as valid JSON.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Added tracking elements to the README and all prompt engineering tutorial notebooks.

Adds the 1x1 analytics view pixel (same pattern RAG_Techniques already uses)
to the README and to all 22 notebooks, pointing at this repo's own views
tracker (prompt-eng-tracker). Previously the repo had only click links
(routed through the RAG tracker) and no view pixel, so README/notebook page
views were never recorded. Each notebook gets a unique notebook= slug using
the existing -- hierarchy convention.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds embedded analytics tracking images across the repository's educational documentation. A tracker image is inserted into README.md and appended to all 22 Jupyter notebooks in all_prompt_engineering_techniques/. Each tracker references a remote prompt-eng-tracker cloud function parameterized with the source document's identifier.

Changes

Prompt Engineering Tracker Analytics Integration

Layer / File(s) Summary
README tracking instrumentation
README.md
README receives an embedded tracker image pointing to prompt-eng-tracker?notebook=main-readme.
Notebook tracking instrumentation
all_prompt_engineering_techniques/ambiguity-clarity.ipynb, all_prompt_engineering_techniques/basic-prompt-structures.ipynb, all_prompt_engineering_techniques/constrained-guided-generation.ipynb, all_prompt_engineering_techniques/cot-prompting.ipynb, all_prompt_engineering_techniques/ethical-prompt-engineering.ipynb, all_prompt_engineering_techniques/evaluating-prompt-effectiveness.ipynb, all_prompt_engineering_techniques/few-shot-learning.ipynb, all_prompt_engineering_techniques/instruction-engineering-notebook.ipynb, all_prompt_engineering_techniques/intro-prompt-engineering-lesson.ipynb, all_prompt_engineering_techniques/multilingual-prompting.ipynb, all_prompt_engineering_techniques/negative-prompting.ipynb, all_prompt_engineering_techniques/prompt-chaining-sequencing.ipynb, all_prompt_engineering_techniques/prompt-formatting-structure.ipynb, all_prompt_engineering_techniques/prompt-length-complexity-management.ipynb, all_prompt_engineering_techniques/prompt-optimization-techniques.ipynb, all_prompt_engineering_techniques/prompt-security-and-safety.ipynb, all_prompt_engineering_techniques/prompt-templates-variables-jinja2.ipynb, all_prompt_engineering_techniques/role-prompting.ipynb, all_prompt_engineering_techniques/self-consistency.ipynb, all_prompt_engineering_techniques/specific-task-prompts.ipynb, all_prompt_engineering_techniques/task-decomposition-prompts.ipynb, all_prompt_engineering_techniques/zero-shot-prompting.ipynb
Each notebook receives a trailing markdown cell with an embedded tracker image from prompt-eng-tracker, each parameterized with its respective notebook identifier in the query string.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🐰 A tracker hops through every page,
From intro to the closing stage—
Each notebook marks its viewing flight,
Analytics burning oh-so-bright!
Hop hop 📊✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding view-tracking pixels to the README and notebooks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-view-tracking-pixels

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Ruff (0.15.15)
all_prompt_engineering_techniques/prompt-formatting-structure.ipynb

Unexpected end of JSON input

all_prompt_engineering_techniques/negative-prompting.ipynb

Unexpected end of JSON input

all_prompt_engineering_techniques/basic-prompt-structures.ipynb

Unexpected end of JSON input

  • 19 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@all_prompt_engineering_techniques/instruction-engineering-notebook.ipynb`:
- Around line 452-457: The notebook currently embeds a remote tracking pixel via
the markdown image URL
("https://europe-west1-prompt-eng-views-tracker.cloudfunctions.net/prompt-eng-tracker?notebook=all-prompt-engineering-techniques--instruction-engineering-notebook")
which issues third-party requests on render; add a visible privacy disclosure
directly above that markdown cell describing what metadata may be collected and
why, and gate the pixel behind explicit consent (e.g., replace the direct image
with a consent button or toggle that, when enabled by the user, loads the
external image), or proxy/replace the external call so no third‑party request
fires without consent; ensure the disclosure is prominent, includes an opt-out,
and that the image URL is not requested until consent is granted.

In `@all_prompt_engineering_techniques/prompt-security-and-safety.ipynb`:
- Around line 417-422: The notebook contains a passive tracking pixel embedded
as the markdown image reference
"![](https://europe-west1-prompt-eng-views-tracker.cloudfunctions.net/prompt-eng-tracker?notebook=all-prompt-engineering-techniques--prompt-security-and-safety)";
replace or augment this with a visible privacy disclosure and an opt-out/opt-in
mechanism: add a short markdown notice above the image explaining what metadata
the pixel collects and why, provide a documented opt-out option (e.g.,
remove/replace the image URL or toggle to disable tracking) and link to
documentation that records the opt-out procedure, and ensure the image is not
requested automatically without explicit consent (e.g., remove the image tag or
conditionally render it after consent) so the pixel cannot fire on notebook
render.

In `@README.md`:
- Line 384: Add a short privacy disclosure immediately adjacent to the README
pixel line (the image URL containing
"https://europe-west1-prompt-eng-views-tracker.cloudfunctions.net/prompt-eng-tracker?notebook=main-readme")
explaining that the remote endpoint receives a passive view ping (e.g.,
timestamp, viewer IP/referrer/agent or a basic view count), the purpose
(aggregate README view metrics), and how to avoid it (disable remote image
loading, block that domain, or remove the image line). Place this as a one- or
two-sentence "Privacy" note next to the existing image tag so readers see it
where the tracking pixel is embedded.
- Line 384: The tracker image tag currently has empty alt text; update the image
markdown to include a concise, descriptive alt attribute (e.g., "Prompt
engineering views tracker") so it passes accessibility linting—locate the image
markdown line containing the tracker URL and replace the empty alt (the ![]
part) with meaningful alt text inside the brackets.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e4ffc3d6-89b7-4f72-b15a-dab7bb890d50

📥 Commits

Reviewing files that changed from the base of the PR and between d43c820 and 52df124.

📒 Files selected for processing (23)
  • README.md
  • all_prompt_engineering_techniques/ambiguity-clarity.ipynb
  • all_prompt_engineering_techniques/basic-prompt-structures.ipynb
  • all_prompt_engineering_techniques/constrained-guided-generation.ipynb
  • all_prompt_engineering_techniques/cot-prompting.ipynb
  • all_prompt_engineering_techniques/ethical-prompt-engineering.ipynb
  • all_prompt_engineering_techniques/evaluating-prompt-effectiveness.ipynb
  • all_prompt_engineering_techniques/few-shot-learning.ipynb
  • all_prompt_engineering_techniques/instruction-engineering-notebook.ipynb
  • all_prompt_engineering_techniques/intro-prompt-engineering-lesson.ipynb
  • all_prompt_engineering_techniques/multilingual-prompting.ipynb
  • all_prompt_engineering_techniques/negative-prompting.ipynb
  • all_prompt_engineering_techniques/prompt-chaining-sequencing.ipynb
  • all_prompt_engineering_techniques/prompt-formatting-structure.ipynb
  • all_prompt_engineering_techniques/prompt-length-complexity-management.ipynb
  • all_prompt_engineering_techniques/prompt-optimization-techniques.ipynb
  • all_prompt_engineering_techniques/prompt-security-and-safety.ipynb
  • all_prompt_engineering_techniques/prompt-templates-variables-jinja2.ipynb
  • all_prompt_engineering_techniques/role-prompting.ipynb
  • all_prompt_engineering_techniques/self-consistency.ipynb
  • all_prompt_engineering_techniques/specific-task-prompts.ipynb
  • all_prompt_engineering_techniques/task-decomposition-prompts.ipynb
  • all_prompt_engineering_techniques/zero-shot-prompting.ipynb

Comment on lines +452 to +457
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![](https://europe-west1-prompt-eng-views-tracker.cloudfunctions.net/prompt-eng-tracker?notebook=all-prompt-engineering-techniques--instruction-engineering-notebook)"
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Add explicit tracking disclosure/consent before embedding remote view pixels.

Line 456 introduces a third-party tracking request on notebook render, which can collect visitor metadata (e.g., IP/user-agent/referrer) without an explicit notice. Please add a visible privacy disclosure (and ideally an opt-out mechanism) where these pixels are introduced, or gate tracking behind explicit consent.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@all_prompt_engineering_techniques/instruction-engineering-notebook.ipynb`
around lines 452 - 457, The notebook currently embeds a remote tracking pixel
via the markdown image URL
("https://europe-west1-prompt-eng-views-tracker.cloudfunctions.net/prompt-eng-tracker?notebook=all-prompt-engineering-techniques--instruction-engineering-notebook")
which issues third-party requests on render; add a visible privacy disclosure
directly above that markdown cell describing what metadata may be collected and
why, and gate the pixel behind explicit consent (e.g., replace the direct image
with a consent button or toggle that, when enabled by the user, loads the
external image), or proxy/replace the external call so no third‑party request
fires without consent; ensure the disclosure is prominent, includes an opt-out,
and that the image URL is not requested until consent is granted.

Comment on lines +417 to +422
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![](https://europe-west1-prompt-eng-views-tracker.cloudfunctions.net/prompt-eng-tracker?notebook=all-prompt-engineering-techniques--prompt-security-and-safety)"
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add explicit disclosure/consent for passive tracking pixels.

This hidden pixel causes automatic outbound requests on notebook render and can collect user metadata (e.g., IP/UA/referrer) without an in-repo disclosure or opt-out path. Please add a visible privacy notice and documented opt-out before rollout.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@all_prompt_engineering_techniques/prompt-security-and-safety.ipynb` around
lines 417 - 422, The notebook contains a passive tracking pixel embedded as the
markdown image reference
"![](https://europe-west1-prompt-eng-views-tracker.cloudfunctions.net/prompt-eng-tracker?notebook=all-prompt-engineering-techniques--prompt-security-and-safety)";
replace or augment this with a visible privacy disclosure and an opt-out/opt-in
mechanism: add a short markdown notice above the image explaining what metadata
the pixel collects and why, provide a documented opt-out option (e.g.,
remove/replace the image URL or toggle to disable tracking) and link to
documentation that records the opt-out procedure, and ensure the image is not
requested automatically without explicit consent (e.g., remove the image tag or
conditionally render it after consent) so the pixel cannot fire on notebook
render.

Comment thread README.md

Keywords: Prompt Engineering, AI, Machine Learning, Natural Language Processing, LLM, Language Models, NLP, Conversational AI, Zero-Shot Learning, Few-Shot Learning, Chain of Thought

![](https://europe-west1-prompt-eng-views-tracker.cloudfunctions.net/prompt-eng-tracker?notebook=main-readme)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add explicit tracking disclosure for the README view pixel.

Line 384 introduces passive analytics collection from a remote endpoint. Please add a short privacy notice in the README (what is collected, purpose, and how users can avoid it) so this is transparent and compliant with common OSS privacy expectations.

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 384-384: Images should have alternate text (alt text)

(MD045, no-alt-text)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 384, Add a short privacy disclosure immediately adjacent
to the README pixel line (the image URL containing
"https://europe-west1-prompt-eng-views-tracker.cloudfunctions.net/prompt-eng-tracker?notebook=main-readme")
explaining that the remote endpoint receives a passive view ping (e.g.,
timestamp, viewer IP/referrer/agent or a basic view count), the purpose
(aggregate README view metrics), and how to avoid it (disable remote image
loading, block that domain, or remove the image line). Place this as a one- or
two-sentence "Privacy" note next to the existing image tag so readers see it
where the tracking pixel is embedded.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Provide alt text for the tracker image.

Line 384 uses an image with empty alt text; this fails markdown accessibility linting and is easy to fix.

Proposed fix
-![](https://europe-west1-prompt-eng-views-tracker.cloudfunctions.net/prompt-eng-tracker?notebook=main-readme)
+![README view tracker pixel](https://europe-west1-prompt-eng-views-tracker.cloudfunctions.net/prompt-eng-tracker?notebook=main-readme)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
![](https://europe-west1-prompt-eng-views-tracker.cloudfunctions.net/prompt-eng-tracker?notebook=main-readme)
![README view tracker pixel](https://europe-west1-prompt-eng-views-tracker.cloudfunctions.net/prompt-eng-tracker?notebook=main-readme)
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 384-384: Images should have alternate text (alt text)

(MD045, no-alt-text)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 384, The tracker image tag currently has empty alt text;
update the image markdown to include a concise, descriptive alt attribute (e.g.,
"Prompt engineering views tracker") so it passes accessibility linting—locate
the image markdown line containing the tracker URL and replace the empty alt
(the ![] part) with meaningful alt text inside the brackets.

Source: Linters/SAST tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant