Popular Posts

Pirates Land INF Gonzalez, LHP Eisert From White Sox

Pirates Land INF Gonzalez, LHP Eisert From White Sox

Behind the Scenes of a News Webpage: An Easy Guide

Introduction: What Is This Code?

Imagine you are building a treehouse. The wood and nails are like the words of a story, but you also need instructions for the ladder and the window. The content we are looking at is a bunch of hidden instructions (called HTML and CSS code) for a news website (the Post-Gazette). It tells the computer how to show buttons, count visitors, and even how to make a pop-up box. Let’s learn what it all means in a super simple way!

The Invisible Counters (Tracking and Analytics)

Websites want to know who is visiting. They use secret helpers that you can’t see.

  • Google Tag Manager: There is a hidden, invisible box (called an "iframe" with no height or width) that tells Google when someone visits, just in case the fancy stuff is turned off.
  • Counting Tools: The code talks about many tools like Google Analytics, Comscore, Krux, CivicScience, and something called A.B.D. These just quietly count clicks and visitors.
  • Cleaning House: The website notes that they removed an old tool called "PGGA code" because they didn’t need it anymore.

Important Point: All these tracking tools help the newspaper understand what stories people like to read!

The Top Buttons (Social Sharing and Menu)

At the top of the page, there is a special bar to help you share and look around.

  • A Menu Button that says "MENU" with a little icon to open a list.
  • A Home/Publish Icon that takes you back to the main Post-Gazette website.
  • Share Buttons so you can send the story to friends on:
    • Facebook
    • Facebook Messenger (a chat app)
    • X (the app formerly known as Twitter)
    • Email
    • Android Text (send by text message, shown as a chat bubble)
  • A Comments Button that shows how many people are talking about the story and lets you join in.

The Secret Side Drawer (Slide Menu)

When you click "MENU", a drawer slides out. Inside this drawer, the code tells the computer to show these labels:

  1. ACCOUNT (to log in)
  2. SECTIONS (different news topics)
  3. OTHER (miscellaneous stuff)
  4. CLASSIFIEDS (buy and sell ads)
  5. CONTACT US / FAQ (ask questions or get help)

The Email Sharing Card (Pop-up Form)

If you click the email button, a little card pops up. The code gives very specific art instructions (called CSS) for this card:

  1. It should be white with a gray border (5 pixels thick, like a picture frame).
  2. The corners should be slightly round (border-radius 5px) and it uses a clean, simple font like Arial.
  3. It should not be too big—only 300 pixels wide—so it fits nicely on your screen without blocking everything.
  4. At the very top, there is a light gray header bar with uppercase letters (like "EMAIL A FRIEND") sitting at the top-left corner.
  5. It has blank boxes (called "input fields") where you type the email addresses of your friends.

Important Point: This pop-up is built to be neat and tidy so it doesn’t block the whole news story!

Making Money (Ads and Paywalls)

News websites need cash to pay writers. The code sets up ways to earn it:

  • Wallpaper Ad: A big background picture advertisement behind the page.
  • Peelback Ad: A fun ad that looks like it is peeling off the page like a sticker.
  • Paid Stories: The code mentions "Metered story (paid)" and a tool called "TinyPass". This means some stories are locked behind a paywall, and you have to pay a little to read them after a certain number of free reads.

Little Extra Helpers

  • A "Back to Top" button is hidden in the code so you can jump back to the top after scrolling down.
  • A Twitter Widget script is loaded at the very end so that tweets show up correctly and quickly.

Summary

The code we explored is like the backstage crew of a news website. It quietly counts visitors using Google Tag Manager and other analytics, shows you buttons to share stories on Facebook or by email, slides out a menu for accounts and classifieds, and puts up ads and paywalls to keep the lights on. Even though it looks like a foreign language, it’s just there to help you read the news without a hitch!

FAQ

1. What is Google Tag Manager in simple terms?
Think of it as a backpack that holds all the website’s counting tools in one place, so the website doesn’t have to carry them one by one.

2. Why does the code talk about removing old stuff (like PGGA)?
Websites are always cleaning up. When they stop using an old tool, they leave a note in the code so other builders know it’s gone and don’t look for it.

3. What is a "Peelback" ad?
It is a special animated advertisement on the corner of the page that looks like it is peeling away like a sticker to reveal something underneath.

4. Why is there a limit of 300 pixels on the email form?
A "pixel" is a tiny dot on your screen. Limiting it to 300 keeps the email pop-up small and neat, so you can still see the news story behind it.

5. What does "Metered story (paid)" mean?
It means you can read a few stories for free (like a meter counting them), but after a while, you have to pay to keep reading, similar to a subscription to a print magazine.

Leave a Reply

Your email address will not be published. Required fields are marked *