Skip to content
Sign upLog in
← Back to Community
Coding Exercise Need Help With
Profile icon
pennymarketing

My Problem in coding:

  • Javascript syntax error preventing from testing further

I'm unable to find where these syntax errors are and why they are preventing from testing the validity of the code.

Here are the steps I needed to follow:
Step 1: Create a new pixel (in facebook)
The pixel ID and function that I embedded was: fbq('init', '2284399068552413');

Step 2: Install the pixel code on your website. Manually install the pixel code on BOTH HTML pages (index.html and checkout.html).

Here is the beginning of the code, header and base code for the pixel embedded on both index.html and checkout.html pages.

Step 3: Verify that your pixel has been initialized successfully.

I am able to verify that the base code for the pixel has been initialized successfully.

Step 4: Using the index.html, send the ViewContent event when the page is loaded, so that you can track the user traffic of who visited this product. Include a parameter to indicate that this product belongs to the “Casual” category.

Step 5: Click Purchase. You are redirected to the checkout.html page to confirm your purchase. On the purchase confirmation page:
a. Send a Purchase event to indicate a successful conversion and include the value of the conversion.
b. Include a parameter to indicate that this purchase belongs to the “Casual” category.

Step 6: Click Subscribe. You see that the user wants to register for newsletters from your website. Send a CompleteRegistration event only when the Subscribe button is clicked. You can implement this on either of the HTML pages.

Step 7: Implement advanced matching on both pages, with the following example information:
Email: [email protected]
Full Name: John Smith
City: Menlo Park
State: California

Please help me find this error

:::: I am not sure where the error is in the code

Voters
Profile icon
pennymarketing
Comments
hotnewtop
Profile icon
pennymarketing

SyntaxError: Unexpected end of input
what does this typically mean

Profile icon
pennymarketing

oops nevermind
okay... ill look at it again... you would think it would tell you what line the error is on. Is there a platform that will do that?

Profile icon
PYer

I don't know js really well, but in the console it says Syntax Error: missing ) after argument list * 2. You probably have 2 missing parantheses somewhere in your code.

Profile icon
pennymarketing

@PYer
Thanks for your help! I don't see that in the console for some reason.

Profile icon
PYer

@pennymarketing
That's what appeared on my screen.