<div id="adverts-container"></div>
<script>
(function() {
const uniqueId = '274e687a-d809-43e3-b33e-acc2d78d03e1'; // Replace with your own placement ID
const containerId = 'adverts-container'; // Replace if you used a different ID in the HTML
const script = document.createElement('script');
script.src = 'https://cdn.reallygreatads.com/script.min.js';
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
1. You'll need to have have the AnyTrack tracking code on your site for this to work. | |
2. Place the first script in GTM or in head of your HTML template. Load on every page. | |
3. Add the second script in the HTML page where you would like the LeadByte form to load. | |
4. Make sure to update the form ID and the URL to match. | |
*/ | |
<script> | |
var url = new URL(window.location.href); | |
var searchParams = url.searchParams; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
AnyTrack(function() { | |
// generates the user client id | |
var at_click_id = AnyTrack('atclid'); | |
var campaign = new Retreaver.Campaign({ | |
campaign_key: '{{ $campaign['retreaverCampaignKey'] }}' | |
}); | |
var tags = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
AnyTrack(function() { | |
// Extract atclid once AnyTrack script is loaded | |
var atclid = AnyTrack('atclid'); | |
var c1 = "7 Facebook Ad Tips"; | |
// Append AnyTrack Click ID to LeadByte form url | |
var url = new URL(window.location.href); | |
var search_params = url.searchParams; | |
search_params.set('atclid', atclid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$requests = DB::table('advert_requests as ar') | |
->select(DB::raw("date_format(ar.created_at, '%Y-%m-%d %H' ) AS grouped_hour, count(*) AS requests")) | |
->join('placements as p', 'p.id', '=', 'ar.placement_id') | |
->where('ar.created_at', '>=', $from) | |
->where('p.site_id', $site_id) | |
->groupBy('grouped_hour') | |
->get(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Let's say you have a local package which you want to do some develoment on by including it in another project | |
/Users/jamesmills/Projects/Packages/larapex-charts | |
// You can use this one-liner to have composer install it from you local file system | |
composer config repositories.local '{"type": "path", "url": "/Users/jamesmills/Projects/Packages/larapex-charts"}' --file composer.json | |
// Which will add this to your composer.json file | |
"repositories": { | |
"local": { | |
"type": "path", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Support\Facades\Storage; | |
class GenerateDropForeignKeyMigration extends Command | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Requests\Api; | |
use Illuminate\Http\JsonResponse; | |
use Illuminate\Contracts\Validation\Validator; | |
use Illuminate\Validation\ValidationException; | |
use Illuminate\Http\Exceptions\HttpResponseException; | |
use Illuminate\Foundation\Http\FormRequest as LaravelFormRequest; |
This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
You're free to use this package, but if it makes it to your production environment you are required to buy the world a tree.
It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to plant trees. If you support this package and contribute to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function fire() | |
{ | |
// See the Placeholder reference page for a list of all the placeholder types and fields. | |
// https://developers.google.com/adwords/api/docs/appendix/placeholders.html | |
define('PLACEHOLDER_SITELINKS', 1); | |
define('PLACEHOLDER_FIELD_SITELINK_LINK_TEXT', 1); | |
define('PLACEHOLDER_FIELD_SITELINK_URL', 2); |
NewerOlder