Skip to content

Commit

Permalink
feat: 태그 관리자 설치
Browse files Browse the repository at this point in the history
  • Loading branch information
pepperdad committed Jul 23, 2024
1 parent d70f0d8 commit 7a57e6d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
24 changes: 24 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
<!doctype html>
<html lang="ko">
<head>
<!-- Google Tag Manager -->
<script>
(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({ "gtm.start": new Date().getTime(), event: "gtm.js" });
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != "dataLayer" ? "&l=" + l : "";
j.async = true;
j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, "script", "dataLayer", "GTM-WL6BLGHM");
</script>
<!-- End Google Tag Manager -->
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/BEAT.svg" />
<link rel="mask-icon" href="/BEAT.svg" color="#FF006B" />
Expand All @@ -15,6 +29,16 @@
<title>BEAT</title>
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript
><iframe
src="https://www.googletagmanager.com/ns.html?id=GTM-WL6BLGHM"
height="0"
width="0"
style="display: none; visibility: hidden"
></iframe
></noscript>
<!-- End Google Tag Manager (noscript) -->
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script>
Expand Down
11 changes: 8 additions & 3 deletions src/apis/domains/files/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { get } from "@apis/index";
import axios, { AxiosResponse } from "axios";
import qs from "qs";

interface ImageInterface {
[key: string]: string;
Expand Down Expand Up @@ -31,9 +30,15 @@ export const getPresignedUrl = async (
const response: AxiosResponse<PresignedResponse> = await get("/files/presigned-url", {
params: paramsWithEmptyArrays,
paramsSerializer: (params) => {
const queryString = qs.stringify(params, { arrayFormat: "repeat" });
// const queryString = qs.stringify(params, { arrayFormat: "repeat" });
const searchParams = new URLSearchParams();

const modifiedQueryString = queryString
for (const [k, v] of Object.entries(params)) {
searchParams.set(k, v);
}

const modifiedQueryString = searchParams
.toString()
.replace(/castImages=%5B%5D/g, "castImages")
.replace(/staffImages=%5B%5D/g, "staffImages");
return modifiedQueryString;
Expand Down

0 comments on commit 7a57e6d

Please sign in to comment.