Skip to content

Commit

Permalink
Merge pull request #20 from SethSharp/sharpie/dev-680-install-thryv-s…
Browse files Browse the repository at this point in the history
…cripts

Install Thryv Scripts + Add Privacy Policy
  • Loading branch information
SethSharp authored Feb 2, 2025
2 parents 82b31ee + 00a1b68 commit bd6cde8
Show file tree
Hide file tree
Showing 6 changed files with 262 additions and 1 deletion.
14 changes: 14 additions & 0 deletions public/js/analytics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var utag_data = {};
(function (a, b, c, d) {
a = 'https://tags.tiqcdn.com/utag/marketingcenter/common/prod/utag.js';
b = document;
c = 'script';
d = b.createElement(c);
d.src = a;
d.type = 'text/java' + c;
d.async = true;
a = b.getElementsByTagName(c)[0];
a.parentNode.insertBefore(d, a);
})();

window.Parameters = window.Parameters || {ExternalUid: '58yrhuqbbtcdx7jq'}
138 changes: 138 additions & 0 deletions public/js/webchat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
setTimeout(() => {
var integrationId = '67638821725c99c3bf56112b'

!(function (o, p, s, e, c) {
var i,
a,
h,
u = [],
d = [];

function t() {
var t = "You must provide a supported major version.";
try {
if (!c) throw new Error(t);
var e,
n = "https://cdn.smooch.io/",
r = "smooch";
if ((e = "string" == typeof this.response ? JSON.parse(this.response) : this.response).url) {
var o = p.getElementsByTagName("script")[0],
s = p.createElement("script");
s.async = !0;
var i = c.match(/([0-9]+).?([0-9]+)?.?([0-9]+)?/),
a = i && i[1];
if (i && i[3]) s.src = n + r + "." + c + ".min.js";
else {
if (!(4 <= a && e["v" + a])) throw new Error(t);
s.src = e["v" + a];
}
o.parentNode.insertBefore(s, o);
}
} catch (e) {
e.message === t && console.error(e);
}
}

(o[s] = {
init: function () {
i = arguments;
var t = {
then: function (e) {
return d.push({type: "t", next: e}), t;
},
catch: function (e) {
return d.push({type: "c", next: e}), t;
},
};
return t;
},
on: function () {
u.push(arguments);
},
render: function () {
a = arguments;
},
destroy: function () {
h = arguments;
},
}),
(o.__onWebMessengerHostReady__ = function (e) {
if ((delete o.__onWebMessengerHostReady__, (o[s] = e), i))
for (var t = e.init.apply(e, i), n = 0; n < d.length; n++) {
var r = d[n];
t = "t" === r.type ? t.then(r.next) : t.catch(r.next);
}
a && e.render.apply(e, a), h && e.destroy.apply(e, h);
for (n = 0; n < u.length; n++) e.on.apply(e, u[n]);
});
var n = new XMLHttpRequest();
n.addEventListener("load", t), n.open("GET", "https://" + e + ".webloader.smooch.io/", !0), (n.responseType = "json"), n.send();
})(window, document, "Smooch", integrationId, "5");
setTimeout(() => {
const delegate = {
beforeSend(message, data) {
const urlParams = new URLSearchParams(window.location.search);
const utm_ci = urlParams.get('utm_ci');
const utm_channel = urlParams.get('utm_channel');
const utm_ad = urlParams.get('utm_ad');
const utm_cm = urlParams.get('utm_cm');

if (utm_ci && utm_channel && utm_ad && utm_cm) {
message.metadata = {
utm_ci,
utm_channel,
utm_ad,
utm_cm
};
}

return message;
}
};
Smooch.init({
integrationId: integrationId,
delegate: delegate,
menuItems: {},
prechatCapture: {
enabled: true,
enableEmailLinking: true,
fields: [
{
type: 'email',
name: 'email',
label: 'Email',
placeholder: '[email protected]'
},
{
type: 'text',
name: 'phone',
label: 'Phone',
placeholder: '555-555-5555'
},
{
type: 'text',
name: 'first_name',
label: 'First Name',
placeholder: 'first name'
},
{
type: 'text',
name: 'last_name',
label: 'Last Name',
placeholder: 'last name'
}
]
},
customText: {
prechatCaptureGreetingText: "Hi there,\n\nBefore you begin, please note that a transcript of this chat may be retained.\n\nTo start off, we'd like to know a little bit about you. \n\n By providing your email and mobile number via this chat, you consent to our Terms of Use and Privacy Policy (found in the footer of this site) and to us sending emails and text messages or placing voice calls to you for advertising and marketing purposes. Giving this consent is not required as a condition of purchasing any goods or services."
},
}).then(
function () {
console.log("Script Ran for Sunshine");
},
function (err) {
console.log("Script Error for Sunshine");
}
);
}, 3000)
}, 5000);
4 changes: 4 additions & 0 deletions resources/views/components/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js"></script>

@vite('resources/css/app.css')

<script src="{{ asset('js/analytics.js') }}"></script>
</head>
<body class="font-mont font-medium antialiased">
<main class="bg-secondary-100">
Expand All @@ -52,5 +54,7 @@
</div>
</div>
</main>

<script src="{{ asset('js/webchat.js') }}"></script>
</body>
</html>
6 changes: 6 additions & 0 deletions resources/views/components/layouts/footer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ class="text-md leading-6 text-gray-300 hover:text-gray-50">
Contact us
</a>
</li>
<li>
<a href="{{route('privacy-policy')}}"
class="text-md leading-6 text-gray-300 hover:text-gray-50">
Privacy Policy
</a>
</li>
</ul>
</div>
</div>
Expand Down
97 changes: 97 additions & 0 deletions resources/views/pages/privacy.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
@section('title', 'Printing - ' . config('app.name'))
@section('description', 'Our Printing services are unparalleled, with our advanced printer and high quality materials we can print anything and any size while maintaining image quality.')

<x-layouts.app>
<x-section.section>
<x-section.wrapper>
<div class="space-y-4 max-w-3xl mx-auto">
<p>
Framed Just For You respects the privacy of every individual who visits our Web sites, responds to
our
interactive advertisements or sends us e-mail. This Privacy Statement outlines the information
Framed
Just
For You will collect and how we will use that information. This Statement will also instruct you on
what
to
do if you do not want your personal information collected or shared when you visit the Framed Just
For
You
Website, respond to our Web-based advertisements or send us email.
</p>

<p>
Framed Just For You will not collect any personally-identifiable information about you (that is,
your
name,
address, telephone number, or email address) unless you provide it to us voluntarily.
</p>

<p>
The following are some examples of when Framed Just For You may require that you provide
personally-identifiable information:
</p>

<ul class="list-disc list-inside ml-2 sm:ml-4">
<li>
to complete an online order for a product or service (if you do not wish to complete an online
order
form,
we will always provide an option for you to complete an order by calling or faxing)
</li>
<li>
to enter an online contest or sweepstakes (if you do not wish to complete an online contest or
sweepstakes
form, we will always provide an option for you to enter by mail)
</li>
<li>
to request more information about new or current Framed Just For You products or services.
</li>
</ul>

<p>
If you do not want your personally-identifiable information collected, please do not submit it to
us. If
you
have already submitted this information and would like for us to remove it from our records, please
contact
us at the email address listed at the bottom of this Statement. We will use reasonable efforts to
delete
your information from our existing files.
</p>

<p>
When you do provide us with personally-identifiable information, we may use that information in the
following ways, unless stated otherwise:
</p>

<ul class="list-disc list-inside ml-2 sm:ml-4">
<li>
we may store and process that information to better understand all customer needs and how we can
improve our
products and services for all customers.
</li>
<li>
we may use that information to contact you with new promotions and announcements if you have
previously
provided your permission and if the promotions and announcements are in your interest.
</li>
<li>
we may contact you if we have questions about your account.
</li>
</ul>

<p>
Framed Just For You will not sell personally-identifiable information to third parties, unless
stated at
the
time of collection. We may share information with business partners. We are committed to giving you
the
choice whether or not we use your information for marketing purposes or share information with
business
partners.
</p>
</div>
</x-section.wrapper>
</x-section.section>
</x-layouts.app>
4 changes: 3 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
Route::get('/printing', fn () => view('pages/printing'))->name('printing');
Route::get('/contact', fn () => view('pages/contact'))->name('contact');
Route::get('/sitemap', fn () => view('pages/sitemap'))->name('sitemap');
Route::get('/privacy-policy', fn () => view('pages/privacy'))->name('privacy-policy');

Route::prefix('/services')->name('services.')->group(function () {
Route::prefix('/custom-framing')->name('framing.')->group(function () {
Expand All @@ -40,7 +41,8 @@
Route::get('/canvas', fn () => view('pages/services/canvas'))->name('canvas');
Route::get('/indigenous', fn () => view('pages/services/indigenous'))->name('indigenous');
Route::get('/jigsaw', fn () => view('pages/services/jigsaw'))->name('jigsaw');
Route::get('/medals-and-memorabilia', fn () => view('pages/services/medals-and-memorabilia'))->name('medals-memorabilia');
Route::get('/medals-and-memorabilia',
fn () => view('pages/services/medals-and-memorabilia'))->name('medals-memorabilia');
Route::get('/mirror', fn () => view('pages/services/mirror'))->name('mirror');
Route::get('/prints-posters', fn () => view('pages/services/prints-posters'))->name('prints-posters');
Route::get('/handcrafted', fn () => view('pages/services/handcrafted'))->name('handcrafted');
Expand Down

0 comments on commit bd6cde8

Please sign in to comment.