DIAP Media

Google Bard SEO Audit

Google Bard SEO Audit

setAPIKey('YOUR_API_KEY'); // Run the audit $results = $audit->run($url); // Get the overall score $score = $results['score']; // Get the individual scores for each category $categories = $results['categories']; // Create the report $report = <<Overall Score

{$score} out of 100

Categories

    {foreach from=$categories item=category}
  • {$category['name']}: {$category['score']}
  • {/foreach}

Details

    {foreach from=$results['details'] item=detail}
  • {$detail['name']}: {$detail['value']}
  • {/foreach}
HTML; // Display the report echo $report; } ?>