Prepare for technical interviews with questions by technology, clear explanations, step-by-step solutions and code you can run.
Collecting and analysing website data to understand user behaviour and improve results.
A Key Performance Indicator, a metric tied directly to a business goal.
One load of a page by a visitor.
Where visitors came from, such as search, social, email or direct.
The first page a visitor sees in a session.
The last page a visitor views before leaving.
The average length of a visit. In GA4, engagement time is the preferred measure.
New users are visiting for the first time. Returning users have visited before.
A unique code linking a website to its analytics property.
A view of activity on the site in the last 30 minutes.
User-defined tracked actions beyond those collected automatically.
Extra detail attached to an event, such as button name or video title.
Automatic tracking of common interactions such as scrolls, outbound clicks and file downloads.
A source of data, such as a website or app, feeding into a GA4 property.
A user-defined attribute added to reports for deeper analysis.
Analysing a subset of data to produce faster reports, which can reduce accuracy on large datasets.
A JavaScript structure that passes information from a website to tags in Tag Manager.
A condition that decides when a tag should fire.
A value, such as a click URL, used by tags and triggers.
Testing tags and events in real time to ensure they fire correctly.
I fire an event on successful submission, via a thank-you page view or form-submit trigger, and mark it as a key event.
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'form_submission',
'form_id': 'contact_form',
'form_name': 'Lead Generation'
});
I compare channels by users, engagement, conversions and revenue to find the most valuable sources.
// GA4 Acquisition Analysis Workflow:
1. Filter by Session default channel group (Organic Search, Paid Search, Direct, Social).
2. Compare User Volume vs. Engagement Rate (>55% benchmark).
3. Sort channels by Conversion Event count and Total Revenue.
4. Calculate Cost Per Acquisition (CPA) per paid channel.
With page paths, engagement reports, funnel and path explorations, heatmaps and session recordings.
// GA4 Path Exploration & Funnel Analysis:
1. Create Funnel Exploration: View Product -> Add to Cart -> Begin Checkout -> Purchase.
2. Measure Step Completion Rate % and Identify Drop-off steps.
3. Segment Funnel by Device Category (Mobile vs Desktop) and User Type.
I link them to view organic queries and landing page performance alongside on-site behaviour.
// Search Console + GA4 Integration Setup:
1. Navigate to GA4 Admin -> Product Links -> Google Search Console Links.
2. Link Search Console Property to GA4 Web Data Stream.
3. Publish Search Console Reports in GA4 Library (Google Organic Search Queries & Traffic).
Through the property's product links, which enables sharing of conversions, audiences and cost data.
// Google Ads + GA4 Linking:
1. GA4 Admin -> Product Links -> Google Ads Links -> Link Account.
2. Enable Auto-Tagging (gclid parameter tracking).
3. Import GA4 Key Events into Google Ads for Bidding Optimization.
Last-click credits only the final touch. Data-driven distributes credit based on each touchpoint's actual contribution.
// Attribution Model Comparison:
Last-Click: Organic (0%) -> Facebook Ad (0%) -> Email Click (100% Credit)
Data-Driven: Organic (20%) -> Facebook Ad (35%) -> Email Click (45% Credit)
GA4's enhanced measurement captures them by default, or I create custom events through GTM.
// GTM Outbound Click Tag Setup:
Trigger: Click - Just Links
Condition: {{Click URL}} does not contain "yourdomain.com"
Event Name: click
Parameters: { link_url: "{{Click URL}}", outbound: "true" }
A custom metric built from existing ones, such as revenue per user.
// Custom Calculated Metric in GA4:
Metric Name: Average Revenue Per Active User (ARPAU)
Formula: {Event revenue} / {Active users}
Unit of Measure: Currency (USD / INR)
I use Explorations to choose dimensions, metrics, filters and visualisations.
// GA4 Free Form Exploration Setup:
Dimensions: Event name, Page path, Device category
Metrics: Event count, Total users, Engagement rate
Visualization: Table / Donut Chart with Segment Comparison
An event logged when a user joins an audience, useful for downstream actions.
// GA4 Audience Trigger Creation:
Audience: High Value Buyers (Purchases >= 3 AND Total Spend >= $500)
Audience Trigger Event: high_value_customer_logged
Action: Push to Google Ads for VIP Remarketing Campaign
I review revenue, conversion rate, average order value, product performance and checkout drop-offs.
// Ecommerce Purchase DataLayer Event Payload:
window.dataLayer.push({
event: "purchase",
ecommerce: {
transaction_id: "T_12345",
value: 2499.00,
currency: "INR",
items: [{ item_id: "SKU-99", item_name: "Developer Course", price: 2499.00, quantity: 1 }]
}
});
By checking for sudden drops or spikes, duplicate events, missing data, odd referrals and mismatches with other systems.
// Tracking Error Diagnostic Checklist:
1. Check Realtime & DebugView for duplicate page_view events.
2. Inspect self-referrals (yourdomain.com appearing as Traffic Source).
3. Audit Data Layer payloads using GTM Preview Mode.
4. Compare GA4 purchase counts against DB Order Table totals (allowable delta < 5%).
Policies for how data is collected, stored, accessed and protected.
// Data Governance Configuration:
- Data Retention: Set to 14 months in GA4 Admin.
- User Data Redaction: Turn on Email & Phone PII Redaction in Data Stream settings.
- Access Control: Role-based permissions (Viewer, Analyst, Editor, Admin).
Data collected directly from your own customers. It matters as third-party cookies decline and privacy rules tighten.
// First-Party Data Strategy:
- User ID Tracking: Pass hashed User ID to GA4 dataLayer upon authenticated login.
- Cookie Flags: Set SameSite=Lax; Secure for first-party tracking cookies.
Sending data from a server rather than the browser, which can improve control and data quality.
// Server-Side Tag Manager Architecture:
Browser -> Server GTM Container (Cloud Run / AWS App Runner) -> GA4 / Meta CAPI / Vendor APIs
Benefits: Bypasses Ad Blockers, Reduces Client JS Payload, Hides API Keys.
With consistent UTM naming, platform integrations and a central dashboard.
// Standardized UTM Builder Pattern:
https://example.com/landing?utm_source=linkedin&utm_medium=cpc&utm_campaign=q4_hiring_promo&utm_content=banner_v2
I define a metric, ensure adequate sample size, run the test to completion, and check statistical significance before deciding.
// A/B Test Evaluation Workflow:
Variant A (Control): 1,000 Visitors, 50 Conversions (5.0% CR)
Variant B (Challenger): 1,000 Visitors, 75 Conversions (7.5% CR)
Z-Score / P-Value: p = 0.021 (< 0.05 -> Statistically Significant Win for Variant B).
Evidence that a result is unlikely to be due to chance, commonly judged at a 95% confidence level.
// Two-Proportion Z-Test Formula:
Z = (p1 - p2) / sqrt(p * (1 - p) * (1/n1 + 1/n2))
Confidence Level: 95% threshold requires |Z| > 1.96.
I compare against benchmarks and prior periods, segment the data and ask why changes happened.
// Diagnostic Analytics Method:
1. What changed? (e.g. Organic Conversion Rate dropped 15% WoW).
2. Where? (Segment by Device: Mobile dropped 28%, Desktop stayed flat).
3. Why? (Audited Mobile Page Speed & found broken CTA button in Safari).
I define key questions, select a few essential metrics, connect data sources and design for clarity.
// Looker Studio Dashboard Architecture:
Data Sources: GA4 + Google Ads + BigQuery + Search Console
Sections: 1. Executive Summary (KPI Scorecards) | 2. Acquisition Funnel | 3. Channel ROI
I list objectives, KPIs, the events and data needed, the tagging approach, owners and reporting cadence.
// Measurement Plan Matrix:
Business Goal -> KPI -> Macro/Micro Event -> Data Layer Spec -> GTM Tag -> GA4 Report
With holdout tests or geo experiments that compare exposed and unexposed groups.
// Geo Experiment Design:
Test Region (Mumbai, Delhi): Paid Search ON
Control Region (Bengaluru, Chennai): Paid Search OFF
Measure net incremental sales lift in Test Region vs. Control baseline.
A statistical method estimating each channel's contribution to sales using aggregate data, useful when user-level tracking is limited.
import statsmodels.api as sm
X = df[['tv_spend', 'digital_spend', 'print_spend', 'seasonality']]
y = df['total_sales']
model = sm.OLS(y, sm.add_constant(X)).fit()
print(model.summary())
I understand differences in attribution, conversion windows and counting methods, and use one source of truth for decisions.
// Common Discrepancy Drivers:
- GA4: Data-Driven Attribution, 30-day click window, deduplicated user visits.
- Meta / Google Ads: 7-day click / 1-day view attribution, pixel fire on impression/click.
I export raw event data to run custom SQL analysis, combine datasets and avoid interface limitations.
SELECT
user_pseudo_id,
COUNT(IF(event_name = 'page_view', 1, NULL)) AS page_views,
SUM(event_value_in_usd) AS total_revenue
FROM `your-project.analytics_123456789.events_*`
WHERE _TABLE_SUFFIX = FORMAT_DATE('%Y%m%d', CURRENT_DATE() - 1)
GROUP BY 1;
I use predictive audiences or models based on behavioural and transactional data.
// GA4 Predictive Metrics:
- Purchase Probability (Users likely to purchase in next 7 days).
- Churn Probability (Active users unlikely to visit in next 7 days).
- Target Predictive Audiences with Google Ads Remarketing campaigns.
By behaviour, value, lifecycle stage or demographics, then I tailor campaigns to each segment.
// Customer Segmentation Framework:
1. Recency, Frequency, Monetary (RFM) Matrix.
2. High Value Loyalists vs. Cart Abandoners vs. At-Risk Churn Candidates.
I present the evidence neutrally, explain the method, acknowledge limits and suggest a test.
// Data Communication Framework:
1. State the objective data findings clearly without judgment.
2. Explain sample size, confidence interval, and data collection methodology.
3. Propose a controlled follow-up A/B experiment to validate findings.
I use naming standards, regular audits, alerts for anomalies and documentation of changes.
// Automated Data Quality Audit Rule:
1. Enforce strict snake_case naming for all GTM dataLayer events.
2. Set up Looker Studio alert triggers for >20% daily traffic anomalies.
3. Maintain a centralized Tracking Change Log documentation.
Audit existing tracking, align on goals and KPIs, fix critical gaps, and build a baseline dashboard.
// First 30 Days Action Plan:
Days 1-10: Audit GTM/GA4 setup, data Layer, data governance & missing tracking.
Days 11-20: Interview stakeholders to define core business KPIs & Measurement Plan.
Days 21-30: Remediate critical tracking bugs & publish initial Executive Dashboard.
Try searching for keywords like "JWT", "Express", "useEffect", "PDO", "GIL", or "schema".
Connect with DigitalXNode expert interviewers for technical mock interviews, domain assessment, and enterprise job placement.