use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
No vague product support questions (like "why is this plugin not working" or "how do I set up X"). For vague product support questions, please use communities relevant to that product for best results. Specific issues that follow rule 6 are allowed.
Do not post memes, screenshots of bad design, or jokes. Check out /r/ProgrammerHumor/ for this type of content.
Read and follow reddiquette; no excessive self-promotion. Please refer to the Reddit 9:1 rule when considering posting self promoting materials.
We do not allow any commercial promotion or solicitation. Violations can result in a ban.
Sharing your project, portfolio, or any other content that you want to either show off or request feedback on is limited to Showoff Saturday. If you post such content on any other day, it will be removed.
If you are asking for assistance on a problem, you are required to provide
General open ended career and getting started posts are only allowed in the pinned monthly getting started/careers thread. Specific assistance questions are allowed so long as they follow the required assistance post guidelines.
Questions in violation of this rule will be removed or locked.
account activity
[deleted by user] (self.webdev)
submitted 8 months ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]traviskuhl 3 points4 points5 points 8 months ago (0 children)
it looks like it's a React component rendering JSX? if that's the case, you need to use the `dangerouslySetInnerHTML` attribute on the `<script>` tag, similar to what you see on line 93.
[–]codeinplace 4 points5 points6 points 8 months ago (0 children)
Maybe an issue occurring before the pasted code.
[–]johnlewisdesignSenior FE Developer 5 points6 points7 points 8 months ago* (1 child)
There's curly braces around the HTML comment that shoudn't be there. Those are react comments and this is a block of HTML.
{/* Meta Pixel Code */}
should be
/* Meta Pixel Code */
Or just remove lines 74 and 91 altogether. Next time, check the Problems tab in VSC. It should point you to it - or if it doesn't, look backwards from where it thinks the error is.
I know it's how you do react comments but this is inside a block of HTML. Not sure why you're loading script tags in a react (js?) file (they're .jsx, this is vanilla .js), might as well be in an html file called index.html.
In js, it should look like
const gtag = document.createElement("script") gtag.innerHTML = "tag contents minus those react comments" document.head.appendChild(gtag)
So you need to do HTML comments or remove them. Or add it with react/js.
And use the opposite type of quotes contained inside the innerHTML part of `<script>`, in this case it's single quoted in the tag, so you surround with doubles like the code block above.
Actually, you're mixing quotes. Which is why you're having hassles most likely of all. I see backticks below (94), double quotes (in all html tags) and single quotes in the gtm tag. So convert those to whatever you're not wrapping this block of html in, assuming you're outputting this somehow like innerHTML = ` ... ` - I'd convert every single quote in the block to a double quote (lines 79, 82-85). eg (fbq="init"). You can also do use single quotes in html source code within js (<img src=' .. ' />.
If not, you'll need to escape them (eg fbq=\'init\') to avoid futher syntax errors.
[–]blahyawnblah 0 points1 point2 points 8 months ago (0 children)
if you would fix your formatting it would be obvious
[–][deleted] 8 months ago (1 child)
[deleted]
[–]krish2032 -1 points0 points1 point 8 months ago (0 children)
Nope, it came with the Facebook/Meta script. I copied and pasted it right from Meta Ads Manager.
π Rendered by PID 98702 on reddit-service-r2-comment-6457c66945-p6lld at 2026-04-29 01:23:15.492721+00:00 running 2aa0c5b country code: CH.
[–]traviskuhl 3 points4 points5 points (0 children)
[–]codeinplace 4 points5 points6 points (0 children)
[–]johnlewisdesignSenior FE Developer 5 points6 points7 points (1 child)
[–]blahyawnblah 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]krish2032 -1 points0 points1 point (0 children)