calcom / cal.com

Scheduling infrastructure for absolutely everyone.
https://cal.com
Other
31.7k stars 7.71k forks source link

Problem with FB pixel #15645

Closed platonie closed 2 months ago

platonie commented 3 months ago

I tried to install a FB pixel. I first install the FB meta pixel app on cal.com. I tried to follow the FB procedure. I create 3 pixels ( stupidely because I believed that I had made a mistake), but now, on my public page I got an error message : No event type configured PLATONIE / WINE TASTING has not configured an event type that you can book

I have deleted the FB meta pixel app on cal.com, changed the URL but I still have the same error message. I've put the original url back, as all my adverts were made using this url

How could I solve this big problem ? (because I made flyers with QRCode )

dosubot[bot] commented 3 months ago

Hey @platonie! I'm here to help you with any bugs, questions, or contribute to the project while you wait for a human maintainer. Let's tackle this together!

To resolve the error message "No event type configured. PLATONIE / WINE TASTING has not configured an event type that you can book" after attempting to install a Facebook pixel on your website using the FB Meta Pixel app on cal.com, you need to ensure that the event type is properly configured in your cal.com setup.

The error suggests that the event type "PLATONIE / WINE TASTING" is not configured correctly or is missing. Here’s what you can do:

  1. Check Event Type Configuration: Ensure that the event type "PLATONIE / WINE TASTING" is properly set up in your cal.com account. You need to have a valid event type that users can book.

  2. Verify Meta Pixel Configuration: Make sure that the Meta Pixel app is correctly configured to extend the "EventType" feature as indicated in the config.json file.

Here is the relevant part of the config.json file that shows the Meta Pixel app configuration:

{
  "extendsFeature": "EventType",
  "appData": {
    "tag": {
      "scripts": [
        {
          "content": "!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');fbq('init','{TRACKING_ID}');fbq('trackCustom','CalcomView');"
        }
      ]
    }
  }
}

Ensure that the TRACKING_ID is correctly replaced with your actual Facebook Pixel ID [1].

  1. Set Pixel ID in Event Type Settings: Use the EventTypeAppSettingsInterface component to set the Pixel ID for the event type. Here is the relevant code snippet:
    
    import type { EventTypeAppSettingsComponent } from "@calcom/app-store/types";
    import { TextField } from "@calcom/ui";

const EventTypeAppSettingsInterface: EventTypeAppSettingsComponent = ({ getAppData, setAppData, disabled, }) => { const trackingId = getAppData("trackingId");

return ( <TextField name="Pixel ID" value={trackingId} disabled={disabled} onChange={(e) => { setAppData("trackingId", e.target.value); }} /> ); };

export default EventTypeAppSettingsInterface;


Ensure that the Pixel ID is correctly set in the event type settings using the above interface <sup>[[2]](https://github.com/calcom/cal.com/blob/main/packages/app-store/metapixel/components/EventTypeAppSettingsInterface.tsx)</sup>.

If the event type is correctly configured and the error persists, you may need to contact cal.com support for further assistance.

<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
platonie commented 3 months ago

The problem is that PLATONIE / WINE TASTING" is not an event, this is the public page. It acts as if it is an event. This is not. How can I solve this problem?

dosubot[bot] commented 3 months ago

Cal.com differentiates between public pages and event types by filtering and processing event types based on their visibility and metadata. A public page could be mistakenly identified as an event type if there is faulty metadata associated with the event type.

To resolve this issue, you should:

  1. Check Metadata: Ensure that the metadata for your event types is correctly configured. Faulty metadata can cause misidentification. The system logs errors for faulty metadata, so check the logs for any related errors.

  2. Verify URL Validity: Ensure that the URL structure is correct and does not inadvertently match any event type slugs. The function isValidCalURL checks if a URL is a valid Cal.com URL by parsing the URL and verifying the existence of the username or team slug and the event type slug.

  3. Review Event Type Configuration: Double-check the configuration of your event types to ensure that none of them are incorrectly set up or hidden. The function getEventTypesPublic retrieves event types associated with a user and filters out hidden event types.

Here are some relevant code snippets:

By ensuring that the metadata is correct, the URL structure is valid, and the event types are properly configured, you can resolve the issue of your public page being mistakenly identified as an event type [1][2][3].

To continue talking to Dosu, mention @dosu.

ciaranha commented 2 months ago

Duplicate: https://github.com/calcom/cal.com/issues/15650