Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7886059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:13:36+00:00 2026-06-03T05:13:36+00:00

In my application I let registered users create their own personal website, and I

  • 0

In my application I let registered users create their own personal website, and I want to let them add an analytics code into the sites header. I understand that there is a risk letting them add their own content so I have limited only to let them add a Google Analytic code.

  1. What is the worse that could happen if I let them enter their own JavaScript into the header of the website.

  2. How can I go about to limit only the Google Analytic code to be added?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:13:37+00:00Added an answer on June 3, 2026 at 5:13 am
    1. Oh let’s see… They could redirect users to a phishing or malware site; attempt to set up drive-by-downloads; completely rewrite the entire pages contents and steal sessions, login credentials and other information from the user or otherwise deface the site; install a keylogger into the user’s browser whilst they are on your site…

    2. Write a check that ensures the ID string provided fits the pattern that all anayltics IDs must follow. Only allow the characters that may appear in an analytics ID. Generate the rest of the surrounding js code yourself. In the comments @yahelc provides the regex ^UA-\d+-\d+$ to validate the UA ID.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I built a LAMP web application that let's users create their own profile page
If we want in our WPF application to let a user make a SQL
I'm developing a Web application that will let users upload images. My concern is
Let's say that I have an application frame, and I want to show a
I need to let users of an application open a folder by clicking a
Let's say we have a grails web application exposing several resources. tags urls users
I want to create an application where the application will ask user to register
please let me know a java multithread application which i can refer ( source
Let's say I build an application on top of net.aserve and bordeaux-threads . My
Let's say your creating an application that needs to send you an email monthly.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.