> ## Documentation Index
> Fetch the complete documentation index at: https://oneviewhub.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Meta for Business

> Understand how Meta for Business works on OneView

export const RevokeAccessFAQ = ({platformName, oauthDashboardUrl, autoRevoke}) => {
  if (autoRevoke) {
    return <Accordion title={`Q: How do I revoke access to my ${platformName} data?`}>
        <Danger>
          Revoking access <strong>will stop OneView from sending conversions to your {platformName} account</strong>.
        </Danger>
        <p>
          You need to revoke access to your {platformName} data on both ends:
        </p>
  
        <ol>
          <li>
            <strong>From OneView</strong>: Navigate to <a href="https://oneviewhub.com/workspace/settings/ad-accounts">Ad Accounts settings</a> and disconnect your {platformName} account.
          </li>
          <li>
            <strong>From {platformName}</strong>: Use your dashboard at (<a href={oauthDashboardUrl}>{oauthDashboardUrl}</a>) and remove <strong>OneView Platform</strong> from your account.
          </li>
        </ol>
        <p>
      When you disconnect your {platformName} account from your OneView workspace, <strong>all credentials are deleted</strong> (on OneView) and <strong>access revocation is requested</strong> (to {platformName}) automatically on your behalf.
    </p>
      </Accordion>;
  }
  return <Accordion title={`Q: How do I revoke access to my ${platformName} data?`}>
      <Danger>
        Revoking access <strong>will stop OneView from sending conversions to your {platformName} account</strong>.
      </Danger>
      
      <p>
          You need to revoke access to your {platformName} data on both ends:
        </p>

      <ol>
        <li>
          <strong>From OneView</strong>: Navigate to <a href="https://oneviewhub.com/workspace/settings/ad-accounts">Ad Accounts settings</a> and disconnect your {platformName} account.
        </li>
        <li>
          <strong>From {platformName}</strong>: Use your dashboard at (<a href={oauthDashboardUrl}>{oauthDashboardUrl}</a>) and remove <strong>OneView Platform</strong> from your account.
        </li>
      </ol>
    </Accordion>;
};

export const IntegrationDataFields = ({platformName, clickIdentifiers, includeCommonFields = false}) => {
  return <>
      {clickIdentifiers && clickIdentifiers.length > 0 && <>
          <p>
            Click identifiers are automatically captured from URL parameters when users click on your {platformName} ads. When click identifiers are missing or expired, OneView uses <a href="/docs/platform/features/delivery/enhanced-conversions">Enhanced Conversions</a> with identifiers from your <a href="/docs/platform/features/processing/identity-resolution">Identity Graph</a> to maintain attribution accuracy.
          </p>
          {clickIdentifiers.map((identifier, index) => <ParamField key={index} path={identifier.name} type="string">
              <strong>{identifier.displayName || identifier.name}</strong> - {identifier.description}
            </ParamField>)}
        </>}

      {includeCommonFields && <>
          <ParamField path="conversion_date_time" type="string" required>
            <strong>Conversion Timestamp</strong> - The date and time when the conversion occurred.

            <p>
              OneView automatically converts timestamps to the timezone of your {platformName} account for accurate cross-dashboard reporting comparisons.
            </p>
          </ParamField>

          <ParamField path="transaction_id" type="string">
            <strong>Transaction ID</strong> - Unique identifier for idempotency and deduplication.

            <p>
              OneView automatically uses the <code>Idempotency-Key</code> of your event as the Event ID, or, if absent, generates a <Tooltip tip="The same payload will always generate the same Event ID.">deterministic</Tooltip> one based on the event payload.
            </p>
          </ParamField>

          <ParamField path="consent" type="object">
            <strong>Consent Information</strong> - Consent information for the conversion, using the <strong>Google Consent Mode</strong> framework.

            <p>
              OneView automatically sets consent information using the <strong>Google Consent Mode</strong> framework, with <code>ad_user_data</code> and <code>ad_personalization</code> values to enforce <a href="/docs/platform/compliance/consent">consent compliance</a>.
            </p>
          </ParamField>
        </>}
    </>;
};

export const IntegrationOverview = ({platformName}) => {
  return <>
      <p>
        {platformName} is configured as a <strong>Conversion API integration</strong> in OneView. OneView automatically sends <a href="/docs/platform/concepts/conversions">conversion data</a> to {platformName}'s API for campaign optimization.
      </p>

      <p>
        OneView automatically handles data mapping, <a href="/docs/platform/features/processing/merit-based-routing">routing rules</a>, and API communication with {platformName}. You simply need to select your <strong>Conversion Events</strong> on OneView, and OneView will take care of the rest.
      </p>
    </>;
};

export const IntegrationHero = ({logoSrc, alt = "Integration logo", maxHeight = 160}) => {
  const containerStyle = {
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'center',
    width: '100%',
    height: '220px'
  };
  const imgStyle = {
    maxHeight: `${maxHeight}px`,
    maxWidth: '100%'
  };
  return <Frame>
      <div style={containerStyle}>
        <img noZoom src={logoSrc} alt={alt} style={imgStyle} />
      </div>
    </Frame>;
};

<IntegrationHero logoSrc="/assets/logos/integrations/Meta.svg" alt="Meta" />

<Tip>
  **Credentials** OneView connects to your Meta account using OAuth and automatically manages token updates in the background.

  To access this integration, you'll need a [**Business Portfolio**](https://www.facebook.com/business/help/486932075688253) on Meta, containing your **Ad Account**, and its **Pixel**.
</Tip>

<IntegrationOverview platformName="Meta" />

## What gets sent to Meta

<IntegrationDataFields
  platformName="Meta"
  clickIdentifiers={[
{
  name: 'fbclid',
  displayName: 'Facebook Click ID',
  description: 'Captured from URL parameters when users click on your Meta ads and navigate to your website.'
}
]}
  includeCommonFields={true}
/>

<IntegrationProcessing platformName="Meta" />

## Advanced Matching

<Warning>
  Make sure you align your **Privacy Policy** to ensure regulatory compliance concerning the re-identification of users.
</Warning>

## Troubleshooting

<AccordionGroup>
  <RevokeAccessFAQ platformName="Meta" oauthDashboardUrl="https://business.facebook.com/latest/settings/connected_apps" autoRevoke={true} />
</AccordionGroup>
